From ed120780512b6dd0bfabba0ea59d06d1099924b0 Mon Sep 17 00:00:00 2001 From: William Pitcock Date: Wed, 1 Feb 2017 04:08:33 +0000 Subject: [PATCH 3/7] sysctl: add compatibility for busybox sysctl --- init.d/sysctl.in | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/init.d/sysctl.in b/init.d/sysctl.in index cb756f3a..fc22364b 100644 --- a/init.d/sysctl.in +++ b/init.d/sysctl.in @@ -38,10 +38,27 @@ BSD_sysctl() Linux_sysctl() { - local quiet + local quiet retval=0 yesno $rc_verbose || quiet=-q - sysctl ${quiet} --system + set -- + eindent + for i in /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; do + if [ -e "$i" ]; then + vebegin "applying $conf" + sysctl ${quiet} -p "$i" + retval=$(( $retval + $? )) + veend $retval + fi + done + eoutdent + + return $retval } start() -- 2.11.0