netifd: fix legacy scripts that expect the ifname option to be mapped to the device...
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 2 Feb 2012 23:01:02 +0000 (23:01 +0000)
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Thu, 2 Feb 2012 23:01:02 +0000 (23:01 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30003 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/netifd/files/lib/network/config.sh

index 4ce362e..ab3efe8 100755 (executable)
@@ -26,6 +26,7 @@ fixup_interface() {
 
        config_get type "$config" type
        config_get ifname "$config" ifname
+       config_get device "$config" device "$ifname"
        [ "bridge" = "$type" ] && ifname="br-$config"
        config_set "$config" device "$ifname"
        ubus_call "network.interface.$config" status
@@ -33,6 +34,7 @@ fixup_interface() {
        [ -n "$l3dev" ] && ifname="$l3dev"
        json_init
        config_set "$config" ifname "$ifname"
+       config_set "$config" device "$device"
 }
 
 scan_interfaces() {