aboutsummaryrefslogtreecommitdiffstats
path: root/package/netifd/files/etc
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-03 10:17:30 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-02-03 10:17:30 +0000
commitde8a98e59db988849d81c3b5c5e9a6f769213697 (patch)
tree2b9f0d41541a7dda456b1614a204dea1a490c862 /package/netifd/files/etc
parent30a072afb0a5661ad37ecb9c9a8b8873ed600b16 (diff)
downloadupstream-de8a98e59db988849d81c3b5c5e9a6f769213697.tar.gz
upstream-de8a98e59db988849d81c3b5c5e9a6f769213697.tar.bz2
upstream-de8a98e59db988849d81c3b5c5e9a6f769213697.zip
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')
-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"
+ }
}