mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-15 21:05:08 +00:00
Use shell matching instead of sed(1) to strip comments and blank lines.
Since it doesn't depend on anything in /usr, it should work with a NFS-mounted /usr partition. Thanks to Bruce Evans to bringing this to my attention.
This commit is contained in:
parent
3c2498c0d3
commit
9d182321ce
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=64446
|
@ -3,14 +3,16 @@
|
|||
# Read in /etc/sysctl.conf and set things accordingly
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if [ -f /etc/sysctl.conf ]; then
|
||||
sed '
|
||||
/^[ ]*#/d
|
||||
/^[ ]*$/d
|
||||
s/#.*$//g
|
||||
' /etc/sysctl.conf |
|
||||
while read var
|
||||
while read var comments
|
||||
do
|
||||
sysctl -w ${var}
|
||||
done
|
||||
case ${var} in
|
||||
\#*|'')
|
||||
;;
|
||||
*)
|
||||
sysctl -w ${var}
|
||||
;;
|
||||
esac
|
||||
done < /etc/sysctl.conf
|
||||
fi
|
||||
|
|
|
@ -3,14 +3,16 @@
|
|||
# Read in /etc/sysctl.conf and set things accordingly
|
||||
#
|
||||
# $FreeBSD$
|
||||
|
||||
if [ -f /etc/sysctl.conf ]; then
|
||||
sed '
|
||||
/^[ ]*#/d
|
||||
/^[ ]*$/d
|
||||
s/#.*$//g
|
||||
' /etc/sysctl.conf |
|
||||
while read var
|
||||
while read var comments
|
||||
do
|
||||
sysctl -w ${var}
|
||||
done
|
||||
case ${var} in
|
||||
\#*|'')
|
||||
;;
|
||||
*)
|
||||
sysctl -w ${var}
|
||||
;;
|
||||
esac
|
||||
done < /etc/sysctl.conf
|
||||
fi
|
||||
|
|
Loading…
Reference in a new issue