1
0
mirror of git://projects.qi-hardware.com/openwrt-xburst.git synced 2025-01-11 23:00:16 +02:00

netifd: fix legacy scripts that expect the ifname option to be mapped to the device option after fixup

git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30003 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
nbd 2012-02-02 23:01:02 +00:00
parent 752da5903f
commit e27bf76f82

View File

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