summaryrefslogtreecommitdiff
path: root/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
diff options
context:
space:
mode:
Diffstat (limited to 'system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch')
-rw-r--r--system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch b/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
new file mode 100644
index 000000000..3803bcca8
--- /dev/null
+++ b/system/openrc/0003-sysctl-add-compatibility-for-busybox-sysctl.patch
@@ -0,0 +1,46 @@
+From ed120780512b6dd0bfabba0ea59d06d1099924b0 Mon Sep 17 00:00:00 2001
+From: William Pitcock <nenolod@dereferenced.org>
+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
+