summaryrefslogtreecommitdiff
path: root/package/base-files/files/etc/hotplug.d/iface/00-netstate
diff options
context:
space:
mode:
Diffstat (limited to 'package/base-files/files/etc/hotplug.d/iface/00-netstate')
-rw-r--r--package/base-files/files/etc/hotplug.d/iface/00-netstate6
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"
+ }
+}