From 46da1409881bee5a1b11691d286f773f38374bd9 Mon Sep 17 00:00:00 2001 From: nbd Date: Sat, 16 Jun 2007 00:01:33 +0000 Subject: 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 --- package/base-files/files/etc/hotplug.d/iface/00-netstate | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 package/base-files/files/etc/hotplug.d/iface/00-netstate (limited to 'package/base-files/files/etc/hotplug.d/iface/00-netstate') 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 000000000..fce5472cf --- /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" + } +} -- cgit v1.2.3