aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files')
-rw-r--r--package/base-files/files/etc/hotplug.d/net/00-sysctl9
-rwxr-xr-xpackage/base-files/files/etc/init.d/sysctl4
-rw-r--r--package/base-files/files/etc/sysctl.d/local.conf1
3 files changed, 10 insertions, 4 deletions
diff --git a/package/base-files/files/etc/hotplug.d/net/00-sysctl b/package/base-files/files/etc/hotplug.d/net/00-sysctl
index 5d9da8ac06..7a71652c44 100644
--- a/package/base-files/files/etc/hotplug.d/net/00-sysctl
+++ b/package/base-files/files/etc/hotplug.d/net/00-sysctl
@@ -1,6 +1,9 @@
#!/bin/sh
-if [ -f /etc/sysctl.conf ] && [ "$ACTION" = add ]; then
- sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" /etc/sysctl.conf | \
- sysctl -e -p - | logger -t sysctl
+if [ "$ACTION" = add ]; then
+ for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
+ [ ! -f "$CONF" ] && continue;
+ sed -ne "/^[[:space:]]*net\..*\.$DEVICENAME\./p" "$CONF" | \
+ sysctl -e -p - | logger -t sysctl
+ done
fi
diff --git a/package/base-files/files/etc/init.d/sysctl b/package/base-files/files/etc/init.d/sysctl
index 36e29eabcb..2dfbaf7a6e 100755
--- a/package/base-files/files/etc/init.d/sysctl
+++ b/package/base-files/files/etc/init.d/sysctl
@@ -3,5 +3,7 @@
START=11
start() {
- [ -f /etc/sysctl.conf ] && sysctl -p -e >&-
+ for CONF in /etc/sysctl.conf /etc/sysctl.d/*.conf; do
+ [ -f "$CONF" ] && sysctl -p "$CONF" -e >&-
+ done
}
diff --git a/package/base-files/files/etc/sysctl.d/local.conf b/package/base-files/files/etc/sysctl.d/local.conf
new file mode 100644
index 0000000000..891da73df8
--- /dev/null
+++ b/package/base-files/files/etc/sysctl.d/local.conf
@@ -0,0 +1 @@
+# local sysctl settings can be stored in this directory