aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2015-07-09 13:23:41 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2015-07-09 13:23:41 +0000
commite24406612af6110fe7e2c881a6532c725dfb249e (patch)
tree8bbf5e08ec84a05c9802e8e42b87d6cda61b9793 /main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
parentbe54c1250ae4686a22c113ff16536e7a439e1368 (diff)
downloadaports-e24406612af6110fe7e2c881a6532c725dfb249e.tar.bz2
aports-e24406612af6110fe7e2c881a6532c725dfb249e.tar.xz
main/openrc: fix sysctl init.c script
busybox sysctl only accept one file so we need to re-run it for each config file.
Diffstat (limited to 'main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch')
-rw-r--r--main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch24
1 files changed, 15 insertions, 9 deletions
diff --git a/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch b/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
index b029352985..0814876a3a 100644
--- a/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
+++ b/main/openrc/0001-sysctl.Linux.in-fix-for-busybox-sysctl.patch
@@ -1,22 +1,28 @@
-From 01dba03704574dda2c43ec3a0609144a8c03c641 Mon Sep 17 00:00:00 2001
+From cc347f6ddacb3c4f1bfc87b274fef1fd7924a539 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(-)
+ init.d/sysctl.Linux.in | 17 ++++++++++++++---
+ 1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/init.d/sysctl.Linux.in b/init.d/sysctl.Linux.in
-index 1defcec..2371b29 100644
+index 186c6ed..ff17892 100644
--- a/init.d/sysctl.Linux.in
+++ b/init.d/sysctl.Linux.in
-@@ -14,6 +14,17 @@ start()
+@@ -10,10 +10,21 @@ depend()
+
+ start()
+ {
+- local quiet
++ local quiet rc=0
yesno $rc_verbose || quiet=-q
ebegin "Configuring kernel parameters"
- sysctl ${quiet} --system
+- eend $? "Unable to configure some kernel parameters"
+ set --
+ for i in /run/sysctl.d/*.conf \
+ /etc/sysctl.d/*.conf \
@@ -25,12 +31,12 @@ index 1defcec..2371b29 100644
+ /lib/sysctl.d/*.conf \
+ /etc/sysctl.conf; do
+ if [ -e "$i" ]; then
-+ set -- "$@" "$i"
++ sysctl ${quiet} -p "$i"
++ rc=$(( $rc + $? ))
+ fi
+ done
-+ sysctl ${quiet} -p "$@"
- eend $? "Unable to configure some kernel parameters"
++ eend $rc "Unable to configure some kernel parameters"
}
--
-2.3.6
+2.4.5