summaryrefslogtreecommitdiff
path: root/openwrt/package/base-files/default
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-08-24 13:22:53 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-08-24 13:22:53 +0000
commite23ea22b7a5323c119468cfffc40aa71cbf7e48d (patch)
tree21c992bcdfbd0514e496a6174fdeda25eb85c801 /openwrt/package/base-files/default
parent6af62b8afc0ac153a5026f97f58ab7bab12fa97a (diff)
downloadmtk-20170518-e23ea22b7a5323c119468cfffc40aa71cbf7e48d.zip
mtk-20170518-e23ea22b7a5323c119468cfffc40aa71cbf7e48d.tar.gz
mtk-20170518-e23ea22b7a5323c119468cfffc40aa71cbf7e48d.tar.bz2
default value for *_device in scan_interfaces
SVN-Revision: 4652
Diffstat (limited to 'openwrt/package/base-files/default')
-rwxr-xr-xopenwrt/package/base-files/default/lib/network/config.sh3
1 files changed, 3 insertions, 0 deletions
diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh
index 0cd6cb8..d4864ae 100755
--- a/openwrt/package/base-files/default/lib/network/config.sh
+++ b/openwrt/package/base-files/default/lib/network/config.sh
@@ -30,6 +30,9 @@ scan_interfaces() {
config_get proto "$CONFIG_SECTION" proto
append interfaces "$CONFIG_SECTION"
( type "scan_$proto" ) >/dev/null 2>/dev/null && eval "scan_$proto '$CONFIG_SECTION'"
+ config_get ifname "$CONFIG_SECTION" ifname
+ config_get device "$CONFIG_SECTION" device
+ config_set "$CONFIG_SECTION" device "${device:-$ifname}"
;;
esac
}