summaryrefslogtreecommitdiff
path: root/package/netifd/files/etc/hotplug.d/iface/00-netstate
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-03 10:17:30 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-03 10:17:30 +0000
commit61f9f96a63312e19a5ff57dc8b75d3d6b62e4e30 (patch)
tree2b9f0d41541a7dda456b1614a204dea1a490c862 /package/netifd/files/etc/hotplug.d/iface/00-netstate
parenta5e6e41fc31551df7af3cc002e2cd3e56b60e59c (diff)
netifd: set the network device in uci state as well to avoid further remapping issues
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30008 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/netifd/files/etc/hotplug.d/iface/00-netstate')
-rw-r--r--package/netifd/files/etc/hotplug.d/iface/00-netstate5
1 files changed, 4 insertions, 1 deletions
diff --git a/package/netifd/files/etc/hotplug.d/iface/00-netstate b/package/netifd/files/etc/hotplug.d/iface/00-netstate
index d5cf761669..c50cda6eac 100644
--- a/package/netifd/files/etc/hotplug.d/iface/00-netstate
+++ b/package/netifd/files/etc/hotplug.d/iface/00-netstate
@@ -1,5 +1,8 @@
[ ifup = "$ACTION" ] && {
uci_toggle_state network "$INTERFACE" up 1
uci_toggle_state network "$INTERFACE" connect_time $(sed -ne 's![^0-9].*$!!p' /proc/uptime)
- [ -n "$DEVICE" ] && uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ [ -n "$DEVICE" ] && {
+ uci_toggle_state network "$INTERFACE" device "$(uci -q get network.$INTERFACE.ifname)"
+ uci_toggle_state network "$INTERFACE" ifname "$DEVICE"
+ }
}