commit:     d29db70efb2adfbd200ba4a03fa78653e97893a6
Author:     William Hubbs <w.d.hubbs <AT> gmail <DOT> com>
AuthorDate: Thu Aug  7 03:01:30 2014 +0000
Commit:     William Hubbs <williamh <AT> gentoo <DOT> org>
CommitDate: Sat Aug  9 17:35:04 2014 +0000
URL:        
http://sources.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=d29db70e

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

---
 init.d/sysctl.Linux.in | 22 ++--------------------
 1 file changed, 2 insertions(+), 20 deletions(-)

diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in
index cda86b5..a1a8897 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"
 }

Reply via email to