diff options
-rw-r--r-- | etc/rc.d/sysctl | 9 | ||||
-rw-r--r-- | etc/rc.sysctl | 9 | ||||
-rw-r--r-- | share/man/man5/sysctl.conf.5 | 10 |
3 files changed, 21 insertions, 7 deletions
diff --git a/etc/rc.d/sysctl b/etc/rc.d/sysctl index 2c00357..1a5c48e 100644 --- a/etc/rc.d/sysctl +++ b/etc/rc.d/sysctl @@ -4,10 +4,13 @@ # # $FreeBSD$ if [ -f /etc/sysctl.conf ]; then - 3< /etc/sysctl.conf - while read 0<&3 var; + sed ' + /^[ ]*#/d + /^[ ]*$/d + s/#.*$//g + ' /etc/sysctl.conf | + while read var do sysctl -w ${var} done - 3<&- fi diff --git a/etc/rc.sysctl b/etc/rc.sysctl index 2c00357..1a5c48e 100644 --- a/etc/rc.sysctl +++ b/etc/rc.sysctl @@ -4,10 +4,13 @@ # # $FreeBSD$ if [ -f /etc/sysctl.conf ]; then - 3< /etc/sysctl.conf - while read 0<&3 var; + sed ' + /^[ ]*#/d + /^[ ]*$/d + s/#.*$//g + ' /etc/sysctl.conf | + while read var do sysctl -w ${var} done - 3<&- fi diff --git a/share/man/man5/sysctl.conf.5 b/share/man/man5/sysctl.conf.5 index 08e6fb1..96cee10 100644 --- a/share/man/man5/sysctl.conf.5 +++ b/share/man/man5/sysctl.conf.5 @@ -42,6 +42,13 @@ command, i.e. .Bd -literal -offset indent sysctl_mib=value .Ed +.Pp +Comments are denoted by a +.Dq # +at the beginning of a line. Comments can also exist at the end of a line, +as seen in the +.Sx EXAMPLES +section, below. .Sh FILES .Bl -tag -width /etc/sysctl.conf -compact .It Pa /etc/sysctl.conf @@ -52,7 +59,8 @@ To turn off logging of programs that exit due to fatal signals, as well as telling Linux programs that you are running FreeBSD 3.4-STABLE, you may use a configuration like .Bd -literal -offset indent -kern.logsigexit=0 +# Configure logging and Linux execution. +kern.logsigexit=0 # Do not log fatal signal exits (e.g. sig 11) compat.linux.osname=FreeBSD compat.linux.osrelease=3.4-STABLE .Ed |