aboutsummaryrefslogtreecommitdiff
path: root/init.d/sysctl.Linux.in
diff options
context:
space:
mode:
Diffstat (limited to 'init.d/sysctl.Linux.in')
-rw-r--r--init.d/sysctl.Linux.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in
index 83e75368..19b4942a 100644
--- a/init.d/sysctl.Linux.in
+++ b/init.d/sysctl.Linux.in
@@ -10,16 +10,25 @@ depend()
start()
{
- local conf= retval=0
+ local conf= retval=0 err errs
+
ebegin "Configuring kernel parameters"
eindent
+
for conf in /etc/sysctl.d/*.conf /etc/sysctl.conf; do
if [ -r "$conf" ]; then
vebegin "applying $conf"
- sysctl -p "$conf" >/dev/null
+ if ! err=$(sysctl -q -p "$conf" 2>&1) ; then
+ errs="${errs} ${err}"
+ sysctl -q -e -p "${conf}"
+ fi
veend $? || retval=1
fi
done
+
eoutdent
- eend $retval "Some errors were encountered"
+ if [ ${retval} -eq 0 ] && [ -n "${errs}" ] ; then
+ ewarn "Unknown keys:${errs}"
+ fi
+ eend $retval "Some errors were encountered: ${errs}"
}