summaryrefslogtreecommitdiffstats
path: root/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
blob: b029352985d2c96b9a3591f4391dbce17ca145df (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
From 01dba03704574dda2c43ec3a0609144a8c03c641 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 28 Apr 2015 12:26:46 +0200
Subject: [PATCH] sysctl.Linux.in: fix for busybox sysctl

busybox sysctl does not support --system
---
 init.d/sysctl.Linux.in | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in
index 1defcec..2371b29 100644
--- a/init.d/sysctl.Linux.in
+++ b/init.d/sysctl.Linux.in
@@ -14,6 +14,17 @@ start()
 	yesno $rc_verbose || quiet=-q
 
 	ebegin "Configuring kernel parameters"
-	sysctl ${quiet} --system
+	set --
+	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
+			set -- "$@" "$i"
+		fi
+	done
+	sysctl ${quiet} -p "$@"
 	eend $? "Unable to configure some kernel parameters"
 }
-- 
2.3.6