aboutsummaryrefslogtreecommitdiffstats
path: root/package/netifd/files
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2012-09-15 12:50:55 +0000
committerJo-Philipp Wich <jow@openwrt.org>2012-09-15 12:50:55 +0000
commitf1eda43e735ccdf79f0d7b8bf9def58bf2462b86 (patch)
tree7a66424160644906b897317e00fe288ba0b6427b /package/netifd/files
parentd365063c595f2d72513253034d113a7d17932028 (diff)
downloadupstream-f1eda43e735ccdf79f0d7b8bf9def58bf2462b86.tar.gz
upstream-f1eda43e735ccdf79f0d7b8bf9def58bf2462b86.tar.bz2
upstream-f1eda43e735ccdf79f0d7b8bf9def58bf2462b86.zip
netifd: prevent error in ifup if no /etc/config/wireless exists, properly handle wifi-iface sections which are part of multiple networks
SVN-Revision: 33425
Diffstat (limited to 'package/netifd/files')
-rwxr-xr-xpackage/netifd/files/sbin/ifup10
1 files changed, 7 insertions, 3 deletions
diff --git a/package/netifd/files/sbin/ifup b/package/netifd/files/sbin/ifup
index 0d2a3ca107..e6dbb35417 100755
--- a/package/netifd/files/sbin/ifup
+++ b/package/netifd/files/sbin/ifup
@@ -50,7 +50,7 @@ else
if_call "network.interface.$1"
fi
-if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
+if [ -n "$setup_wifi" ] && grep -sq config /etc/config/wireless; then
. /lib/functions.sh
find_related_radios() {
@@ -58,8 +58,12 @@ if [ -n "$setup_wifi" ] && grep -q config /etc/config/wireless; then
config_get wdev "$1" device
config_get wnet "$1" network
- if [ -n "$wdev" ] && [ "$wnet" = "$network" ]; then
- append radio_devs "$wdev" "$N"
+ if [ -n "$wdev" ]; then
+ for wnet in $wnet; do
+ if [ "$wnet" = "$network" ]; then
+ append radio_devs "$wdev" "$N"
+ fi
+ done
fi
}