From 61789cc7982a6f616e5baf87a16e191d39888a10 Mon Sep 17 00:00:00 2001 From: deraadt <> Date: Sat, 1 Jan 2000 22:45:35 +0000 Subject: [PATCH] process sysctl.conf way earlier --- src/etc/rc | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/etc/rc b/src/etc/rc index 05b6cd2a..cf5c19f0 100644 --- a/src/etc/rc +++ b/src/etc/rc @@ -1,4 +1,4 @@ -# $OpenBSD: rc,v 1.125 1999/11/23 02:20:14 deraadt Exp $ +# $OpenBSD: rc,v 1.126 2000/01/01 22:45:35 deraadt Exp $ # System startup script run by init on autoboot # or after single-user. @@ -105,6 +105,17 @@ else > /dev/null 2>&1 fi +if [ -f /etc/sysctl.conf ]; then +( + # delete comments and blank lines + set -- `sed -e 's/#.*$//' /etc/sysctl.conf | grep -v '^$'` + while [ $# -ge 1 ] ; do + sysctl -w $1 + shift 1 + done +) +fi + # set hostname, turn on network echo 'starting network' . /etc/netstart @@ -298,17 +309,6 @@ echo clearing /tmp find . ! -name . ! -name lost+found ! -name quota.user \ ! -name quota.group -execdir rm -rf -- {} \; -type d -prune) -if [ -f /etc/sysctl.conf ]; then -( - # delete comments and blank lines - set -- `sed -e 's/#.*$//' /etc/sysctl.conf | grep -v '^$'` - while [ $# -ge 1 ] ; do - sysctl -w $1 - shift 1 - done -) -fi - [ -f /etc/rc.securelevel ] && . /etc/rc.securelevel if [ X${securelevel} != X"" ]; then echo -n 'setting kernel security level: '