summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2006-08-27 10:05:58 +0000
committerFelix Fietkau <nbd@openwrt.org>2006-08-27 10:05:58 +0000
commit12eb1c316840776ababe91f93ca96c74e93d6c61 (patch)
treedd0820d500d0eb3de63c5b44e3592794d056093c
parentdb4a45ac7363508d1d2e69f24fcb38b099e1f11c (diff)
downloadmtk-20170518-12eb1c316840776ababe91f93ca96c74e93d6c61.zip
mtk-20170518-12eb1c316840776ababe91f93ca96c74e93d6c61.tar.gz
mtk-20170518-12eb1c316840776ababe91f93ca96c74e93d6c61.tar.bz2
fix find_config() in the network scripts
SVN-Revision: 4682
-rwxr-xr-xopenwrt/package/base-files/default/lib/network/config.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/openwrt/package/base-files/default/lib/network/config.sh b/openwrt/package/base-files/default/lib/network/config.sh
index 5bc74d1..ec05c3e 100755
--- a/openwrt/package/base-files/default/lib/network/config.sh
+++ b/openwrt/package/base-files/default/lib/network/config.sh
@@ -4,12 +4,15 @@
# DEBUG="echo"
find_config() {
- local iftype iface ifn
+ local iftype device iface ifaces ifn
for ifn in $interfaces; do
config_get iftype "$ifn" type
config_get iface "$ifn" ifname
+ case "$iftype" in
+ bridge) config_get ifaces "$ifn" ifnames;;
+ esac
config_get device "$ifn" device
- for ifc in ${device:-$iface}; do
+ for ifc in $device $iface $ifaces; do
[ "$ifc" = "$1" ] && {
echo "$ifn"
return 0