base-files: allow wireless ifaces to be part of multiple networks
authorJo-Philipp Wich <jow@openwrt.org>
Tue, 26 Jun 2012 15:25:33 +0000 (15:25 +0000)
committerJo-Philipp Wich <jow@openwrt.org>
Tue, 26 Jun 2012 15:25:33 +0000 (15:25 +0000)
SVN-Revision: 32503

package/base-files/Makefile
package/base-files/files/sbin/wifi

index 2759e43a56c1dc447d15d8a98399aab8401a4329..67e17111cf4237599945349ee54cd693a0a3bb54 100644 (file)
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=110
+PKG_RELEASE:=111
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index 8528efeed68521d1a1496cdcc0696614dce4b7cb..ef207878be1c2787daa244dc37f15a3edea2eb85 100755 (executable)
@@ -38,9 +38,12 @@ bridge_interface() {(
        include /lib/network
        scan_interfaces
 
-       config_get iftype "$cfg" type
-       [ "$iftype" = bridge ] && config_get "$cfg" ifname
-       prepare_interface_bridge "$cfg"
+       for cfg in $cfg; do
+               config_get iftype "$cfg" type
+               [ "$iftype" = bridge ] && config_get "$cfg" ifname
+               prepare_interface_bridge "$cfg"
+               return $?
+       done
 )}
 
 prepare_key_wep() {
@@ -132,7 +135,9 @@ start_net() {(
        [ -z "$config" ] || {
                include /lib/network
                scan_interfaces
-               setup_interface "$iface" "$config" "" "$vifmac"
+               for config in $config; do
+                       setup_interface "$iface" "$config" "" "$vifmac"
+               done
        }
 )}