aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/etc/hotplug.d/net
diff options
context:
space:
mode:
authorJohn Crispin <blogic@openwrt.org>2015-07-07 13:47:23 +0000
committerJohn Crispin <blogic@openwrt.org>2015-07-07 13:47:23 +0000
commit465a0d3899414cb9f9572b2573635d48baf18d7a (patch)
treee0206b9780a7b6a3eeff17bf2d8e068c7c673c36 /package/base-files/files/etc/hotplug.d/net
parentda93e16c643d08f70acee32d2b86054d343951cb (diff)
downloadmaster-187ad058-465a0d3899414cb9f9572b2573635d48baf18d7a.tar.gz
master-187ad058-465a0d3899414cb9f9572b2573635d48baf18d7a.tar.bz2
master-187ad058-465a0d3899414cb9f9572b2573635d48baf18d7a.zip
sysctl: read settings from /etc/sysctl.d/*.conf
This changes makes it possible to store custom settings in individual files inside the directory /etc/sysctl.d/. Signed-off-by: Stefan Tomanek <stefan.tomanek+openwrt@wertarbyte.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@46239 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/net')
-rw-r--r--package/base-files/files/etc/hotplug.d/net/00-sysctl9
1 files changed, 6 insertions, 3 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