summaryrefslogtreecommitdiffstats
path: root/etc/rc.sysctl
diff options
context:
space:
mode:
authorchris <chris@FreeBSD.org>2000-01-16 18:12:42 +0000
committerchris <chris@FreeBSD.org>2000-01-16 18:12:42 +0000
commit29fd6b6840e1f151ed18abe00cd191e6d7943c2e (patch)
tree79dc55c97c96ad390cd8ceeb182785780431408d /etc/rc.sysctl
parent4338629a916cc92e6fe6710cca485f9eaa64e724 (diff)
downloadFreeBSD-src-29fd6b6840e1f151ed18abe00cd191e6d7943c2e.zip
FreeBSD-src-29fd6b6840e1f151ed18abe00cd191e6d7943c2e.tar.gz
Add and document support for handling comments and blank lines
in /etc/sysctl.conf. Reviewed by: imp, jkh
Diffstat (limited to 'etc/rc.sysctl')
-rw-r--r--etc/rc.sysctl9
1 files changed, 6 insertions, 3 deletions
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
OpenPOWER on IntegriCloud