netifd: set the network device in uci state as well to avoid further remapping issues
authorFelix Fietkau <nbd@openwrt.org>
Fri, 3 Feb 2012 10:17:30 +0000 (10:17 +0000)
committerFelix Fietkau <nbd@openwrt.org>
Fri, 3 Feb 2012 10:17:30 +0000 (10:17 +0000)
SVN-Revision: 30008

package/netifd/files/etc/hotplug.d/iface/00-netstate

index d5cf7616690a2499e2c252abcadc7baa12966152..c50cda6eacfead48b229b523d7f720bed2ef1b25 100644 (file)
@@ -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"
+       }
 }