blob: 3803bcca8189abd0a10d5649f5a1865c7e540016 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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
|