diff options
author | 2000-01-01 22:45:35 +0000 | |
---|---|---|
committer | 2000-01-01 22:45:35 +0000 | |
commit | f753b29fc1f0c59f7f4b63d7c4ee07e40fa1ca34 (patch) | |
tree | 0219882712acd02c0167be26739796f7f0d1fcff | |
parent | move sysctl(8) to /sbin, with a relative symbolic link remaining in the old location (diff) | |
download | wireguard-openbsd-f753b29fc1f0c59f7f4b63d7c4ee07e40fa1ca34.tar.xz wireguard-openbsd-f753b29fc1f0c59f7f4b63d7c4ee07e40fa1ca34.zip |
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: ' |