diff options
author | Felix Fietkau <nbd@openwrt.org> | 2007-06-16 00:01:33 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2007-06-16 00:01:33 +0000 |
commit | 97ca42e813d5a0a03bd1a70576375dad8469044a (patch) | |
tree | 90b0a4b1f403fbf8f0c1576ca1ea25d8fe4af8ee /package/base-files/files/etc/hotplug.d/iface | |
parent | 947b9e0e9501105e71916c58dcbc67501f677bed (diff) | |
download | master-187ad058-97ca42e813d5a0a03bd1a70576375dad8469044a.tar.gz master-187ad058-97ca42e813d5a0a03bd1a70576375dad8469044a.tar.bz2 master-187ad058-97ca42e813d5a0a03bd1a70576375dad8469044a.zip |
keep track of the network interface states (stored in uci format in /var/state/network, overlay over /etc/config/network)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@7643 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/iface')
-rw-r--r-- | package/base-files/files/etc/hotplug.d/iface/00-netstate | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/package/base-files/files/etc/hotplug.d/iface/00-netstate b/package/base-files/files/etc/hotplug.d/iface/00-netstate new file mode 100644 index 0000000000..fce5472cf2 --- /dev/null +++ b/package/base-files/files/etc/hotplug.d/iface/00-netstate @@ -0,0 +1,6 @@ +[ ifup = "$ACTION" ] && { + uci set "/var/state/network.$INTERFACE.up=1" + [ -z "$DEVICE" ] || { + uci set "/var/state/network.$INTERFACE.ifname=$DEVICE" + } +} |