summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderaadt <deraadt@openbsd.org>1998-02-05 09:54:36 +0000
committerderaadt <deraadt@openbsd.org>1998-02-05 09:54:36 +0000
commit385f4dca8bf62dece0c683c05112b9d7b5192717 (patch)
treed68d95b21425d39bf17d0454cf235209b64e0164
parentapparently when some people only commit rarely, they forget to test their changes (diff)
downloadwireguard-openbsd-385f4dca8bf62dece0c683c05112b9d7b5192717.tar.xz
wireguard-openbsd-385f4dca8bf62dece0c683c05112b9d7b5192717.zip
introduce /etc/sysctl.conf containing sysctl variables to change at boot time
-rw-r--r--etc/rc16
-rw-r--r--etc/rc.conf3
-rw-r--r--etc/sysctl.conf6
3 files changed, 18 insertions, 7 deletions
diff --git a/etc/rc b/etc/rc
index 11d95a5d3a9..3d4d7f81908 100644
--- a/etc/rc
+++ b/etc/rc
@@ -1,4 +1,4 @@
-# $OpenBSD: rc,v 1.60 1998/01/23 08:38:31 art Exp $
+# $OpenBSD: rc,v 1.61 1998/02/05 09:54:36 deraadt Exp $
# System startup script run by init on autoboot
# or after single-user.
@@ -113,10 +113,6 @@ if [ X"${ipfilter}" = X"YES" -a X"${ipmon_flags}" != X"NO" ]; then
echo 'starting ipmon'; ipmon ${ipmon_flags}
fi
-if [ X"${rfc1323}" = X"NO" ]; then
- echo 'disabling rfc1323'; sysctl -w net.inet.tcp.rfc1323=0
-fi
-
# $photurisd_flags is imported from /etc/rc.conf;
# If $photurisd_flags == NO or /etc/photuris/photuris.conf doesn't exist, then
# photurisd isn't run.
@@ -230,6 +226,16 @@ echo clearing /tmp
find . ! -name . ! -name lost+found ! -name quota.user \
! -name quota.group -exec 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
+
test -f /etc/rc.securelevel && . /etc/rc.securelevel
if [ X${securelevel} != X"" ]; then
echo -n 'setting kernel security level: '
diff --git a/etc/rc.conf b/etc/rc.conf
index a5fd24f7dd5..e18dbe5c2d8 100644
--- a/etc/rc.conf
+++ b/etc/rc.conf
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# $OpenBSD: rc.conf,v 1.9 1998/01/21 23:35:57 downsj Exp $
+# $OpenBSD: rc.conf,v 1.10 1998/02/05 09:54:37 deraadt Exp $
# set these to "NO" to turn them off. otherwise, they're used as flags
routed_flags=NO # for 'normal' use: routed_flags="-q"
@@ -28,7 +28,6 @@ portmap=YES # almost always needed
inetd=YES # almost always needed
lpd=NO # printing daemons
check_quotas=YES # NO may be desireable in some YP environments
-rfc1323=YES # TCP RFC1323 extensions (disable if tcp is slow)
ipforward=NO # route packets between interfaces
# miscellaneous other flags
diff --git a/etc/sysctl.conf b/etc/sysctl.conf
new file mode 100644
index 00000000000..ced4032cc3f
--- /dev/null
+++ b/etc/sysctl.conf
@@ -0,0 +1,6 @@
+# $OpenBSD: sysctl.conf,v 1.1 1998/02/05 09:54:37 deraadt Exp $
+# This files contains a list of sysctl options the user wants set at
+# boot time.
+# ie.
+#net.inet.tcp.rfc1323=0 # TCP RFC1323 extensions (disable if tcp is slow)
+#ddb.panic_ddb=0 # Do not drop into ddb on a kernel panic