parent
bb96dc4e01
commit
1d9ce8e9a1
@ -12,13 +12,21 @@ depend()
|
|||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
[ -e /etc/sysctl.conf ] || return 0
|
[ -e /etc/sysctl.conf ] || return 0
|
||||||
local retval=0 var= comments=
|
local retval=0 var= comments= conf=
|
||||||
ebegin "Configuring kernel parameters"
|
ebegin "Configuring kernel parameters"
|
||||||
while read var comments; do
|
eindent
|
||||||
case "$var" in
|
for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
|
||||||
""|"#"*) continue;;
|
if [ -r "$conf" ]; then
|
||||||
esac
|
vebegin "applying $conf"
|
||||||
sysctl -w "$var" >/dev/null || retval=1
|
while read var comments; do
|
||||||
done < /etc/sysctl.conf
|
case "$var" in
|
||||||
|
""|"#"*) continue;;
|
||||||
|
esac
|
||||||
|
sysctl -w "$var" >/dev/null || retval=1
|
||||||
|
done < "$conf"
|
||||||
|
veend $retval
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eoutdent
|
||||||
eend $retval "Some errors were encountered"
|
eend $retval "Some errors were encountered"
|
||||||
}
|
}
|
||||||
|
@ -11,8 +11,16 @@ depend()
|
|||||||
|
|
||||||
start()
|
start()
|
||||||
{
|
{
|
||||||
[ -e /etc/sysctl.conf ] || return 0
|
local conf= retval=0
|
||||||
ebegin "Configuring kernel parameters"
|
ebegin "Configuring kernel parameters"
|
||||||
sysctl -p >/dev/null
|
eindent
|
||||||
eend $? "Some errors were encountered"
|
for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
|
||||||
|
if [ -r "$conf" ]; then
|
||||||
|
vebegin "applying $conf"
|
||||||
|
sysctl -p "$conf" >/dev/null
|
||||||
|
veend $? || retval=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
eoutdent
|
||||||
|
eend $retval "Some errors were encountered"
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user