Fix sysctl on Linux and BSD.

This commit is contained in:
Roy Marples 2008-03-25 14:35:52 +00:00
parent fc7e6a3ada
commit 3d0fc150dc

View File

@ -9,11 +9,7 @@ depend()
keyword noprefix
}
start()
{
[ -e /etc/sysctl.conf ] || return 0
ebegin "Configuring kernel parameters"
sysctl_BSD() {
local retval=0 var= comments=
while read var comments; do
case "${var}" in
@ -21,6 +17,21 @@ start()
esac
sysctl -w "${var}" >/dev/null || retval=1
done < /etc/sysctl.conf
eend ${retval} "Some errors were encountered"
eend $?
return ${retval}
}
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"
}