diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-01-01 22:45:36 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2000-01-01 22:45:36 +0000 |
commit | c635b32a9155f6acac8b76761f2d465da771f3d7 (patch) | |
tree | 9843167dfe0556b4ad7c9219834082d3efed8829 | |
parent | ac8b2716391670d402d9d0a5154a02499f59a1a7 (diff) |
process sysctl.conf way earlier
-rw-r--r-- | etc/rc | 24 |
1 files changed, 12 insertions, 12 deletions
@@ -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: ' |