Fix sysctl on Linux and BSD.
This commit is contained in:
parent
fc7e6a3ada
commit
3d0fc150dc
@ -9,11 +9,7 @@ depend()
|
|||||||
keyword noprefix
|
keyword noprefix
|
||||||
}
|
}
|
||||||
|
|
||||||
start()
|
sysctl_BSD() {
|
||||||
{
|
|
||||||
[ -e /etc/sysctl.conf ] || return 0
|
|
||||||
|
|
||||||
ebegin "Configuring kernel parameters"
|
|
||||||
local retval=0 var= comments=
|
local retval=0 var= comments=
|
||||||
while read var comments; do
|
while read var comments; do
|
||||||
case "${var}" in
|
case "${var}" in
|
||||||
@ -21,6 +17,21 @@ start()
|
|||||||
esac
|
esac
|
||||||
sysctl -w "${var}" >/dev/null || retval=1
|
sysctl -w "${var}" >/dev/null || retval=1
|
||||||
done < /etc/sysctl.conf
|
done < /etc/sysctl.conf
|
||||||
eend ${retval} "Some errors were encountered"
|
return ${retval}
|
||||||
eend $?
|
}
|
||||||
|
|
||||||
|
sysctl_Linux() {
|
||||||
|
sysctl -p >/dev/null
|
||||||
|
}
|
||||||
|
|
||||||
|
start()
|
||||||
|
{
|
||||||
|
[ -e /etc/sysctl.conf ] || return 0
|
||||||
|
|
||||||
|
ebegin "Configuring kernel parameters"
|
||||||
|
case "${RC_UNAME}" in
|
||||||
|
Linux) sysctl_Linux;;
|
||||||
|
*) sysctl_BSD;;
|
||||||
|
esac
|
||||||
|
eend $? "Some errors were encountered"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user