diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-03-25 18:43:30 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-03-25 18:43:30 +0000 |
commit | 08fd7e4663bd3acaef8c1ffc24abd6dbef28414b (patch) | |
tree | 4d7fab32a4374498605e742d2ac0a51c51769a10 /package/base-files/files/etc/hotplug.d/net | |
parent | d1d59cf7e0ec61784d1e3e0629f10cecc9bd2d30 (diff) | |
download | upstream-08fd7e4663bd3acaef8c1ffc24abd6dbef28414b.tar.gz upstream-08fd7e4663bd3acaef8c1ffc24abd6dbef28414b.tar.bz2 upstream-08fd7e4663bd3acaef8c1ffc24abd6dbef28414b.zip |
package/base-files: change sysctl handling
Move /etc/init.d/sysctl to index 00 and add hotplug script that applies
interface specific sysctls for interfaces that only appear later - this
allows to reliably configure per-interface parameters in sysctl.conf, e.g.
to disable ipv6 autoconfig on a specific iface.
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@36129 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-sysctl | 6 |
1 files changed, 6 insertions, 0 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 new file mode 100644 index 0000000000..5d9da8ac06 --- /dev/null +++ b/package/base-files/files/etc/hotplug.d/net/00-sysctl @@ -0,0 +1,6 @@ +#!/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 +fi |