diff options
author | John Crispin <john@openwrt.org> | 2015-07-07 13:47:23 +0000 |
---|---|---|
committer | John Crispin <john@openwrt.org> | 2015-07-07 13:47:23 +0000 |
commit | 3787c32183570e9fa77284ba1ae62fc84e2f83fe (patch) | |
tree | 9d52e5033851dbaf0da5411e5d88bb85bb254f4d /package/base-files/files/etc/hotplug.d/net | |
parent | 0e2d9769be9b0b04bee0706f8f7cd493f01d3cee (diff) | |
download | mtk-20170518-3787c32183570e9fa77284ba1ae62fc84e2f83fe.zip mtk-20170518-3787c32183570e9fa77284ba1ae62fc84e2f83fe.tar.gz mtk-20170518-3787c32183570e9fa77284ba1ae62fc84e2f83fe.tar.bz2 |
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>
SVN-Revision: 46239
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/net')
-rw-r--r-- | package/base-files/files/etc/hotplug.d/net/00-sysctl | 9 |
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 5d9da8a..7a71652 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 |