aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-02 23:01:02 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-02-02 23:01:02 +0000
commitbffa830f13d610bce0d9357c35759dec099a9ea5 (patch)
treecf91ae310a9b90c6530043dad4d7b4c4209ac403
parentf99bf6517c03e96f4d883a902ff1e86f8e12b7c1 (diff)
downloadupstream-bffa830f13d610bce0d9357c35759dec099a9ea5.tar.gz
upstream-bffa830f13d610bce0d9357c35759dec099a9ea5.tar.bz2
upstream-bffa830f13d610bce0d9357c35759dec099a9ea5.zip
netifd: fix legacy scripts that expect the ifname option to be mapped to the device option after fixup
SVN-Revision: 30003
-rwxr-xr-xpackage/netifd/files/lib/network/config.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/netifd/files/lib/network/config.sh b/package/netifd/files/lib/network/config.sh
index 4ce362eb19..ab3efe8c00 100755
--- a/package/netifd/files/lib/network/config.sh
+++ b/package/netifd/files/lib/network/config.sh
@@ -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() {