diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-15 12:50:55 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2012-09-15 12:50:55 +0000 |
commit | 49f3e5cd4e395d440db6d5377e17ae6c6f9f4bb2 (patch) | |
tree | 6bd05c5f3af8b1279162ac35cd63fe95b387a5f2 | |
parent | d59be1dcfdbd25a3132dd459e001a8962c2f3f56 (diff) | |
download | upstream-49f3e5cd4e395d440db6d5377e17ae6c6f9f4bb2.tar.gz upstream-49f3e5cd4e395d440db6d5377e17ae6c6f9f4bb2.tar.bz2 upstream-49f3e5cd4e395d440db6d5377e17ae6c6f9f4bb2.zip |
[package] netifd: prevent error in ifup if no /etc/config/wireless exists, properly handle wifi-iface sections which are part of multiple networks
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33425 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rwxr-xr-x | package/netifd/files/sbin/ifup | 10 |
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 } |