aboutsummaryrefslogtreecommitdiff
path: root/init.d
diff options
context:
space:
mode:
authorWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-06 22:01:30 -0500
committerWilliam Hubbs <w.d.hubbs@gmail.com>2014-08-09 12:35:04 -0500
commitd29db70efb2adfbd200ba4a03fa78653e97893a6 (patch)
treeccc13f02250ccb9999dbbc613fd1f7ad78f0077f /init.d
parent6a337ff6c531d9d7310253b67b3e95d1ce5d214c (diff)
sysctl.linux.in: use the --system option
According to the sysctl man page, the --system option causes sysctl to process all system configuration files, which include the following: /run/sysctl.d/*.conf /etc/sysctl.d/*.conf /usr/local/lib/sysctl.d/*.conf /usr/lib/sysctl.d/*.conf /lib/sysctl.d/*.conf /etc/sysctl.conf X-Gentoo-Bug: 484796 X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=484796
Diffstat (limited to 'init.d')
-rw-r--r--init.d/sysctl.Linux.in22
1 files changed, 2 insertions, 20 deletions
diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in
index cda86b53..a1a88977 100644
--- a/init.d/sysctl.Linux.in
+++ b/init.d/sysctl.Linux.in
@@ -10,25 +10,7 @@ depend()
start()
{
- local conf= retval=0 err errs
-
ebegin "Configuring kernel parameters"
- eindent
-
- for conf in @SYSCONFDIR@/sysctl.conf @SYSCONFDIR@/sysctl.d/*.conf; do
- if [ -r "$conf" ]; then
- vebegin "applying $conf"
- if ! err=$(sysctl -p "$conf" 2>&1 >/dev/null) ; then
- errs="${errs} ${err}"
- sysctl -e -p "${conf}" >/dev/null
- fi
- veend $? || retval=1
- fi
- done
-
- eoutdent
- if [ ${retval} -eq 0 ] && [ -n "${errs}" ] ; then
- ewarn "Unknown keys:${errs}"
- fi
- eend $retval "Some errors were encountered: ${errs}"
+ sysctl --system
+ eend $? "Unable to configure some kernel parameters"
}