2 # Copyright (C) 2006-2011 OpenWrt.org
7 [ $# = 0 ] && { echo " $0 <group>"; exit; }
13 [ -e "/tmp/resolv.conf.auto" ] && rm /tmp
/resolv.conf.auto
15 [ interface
!= "$1" -o -z "$2" ] ||
eval "$0 -w $2"
20 "-w") setup_wifi
=0; shift ;;
23 if [ $setup_wifi -gt 0 ] && grep -q config
/etc
/config
/wireless
; then
24 find_related_radios
() {
26 config_get wdev
"$1" device
27 config_get wnet
"$1" network
29 if [ -n "$wdev" ] && [ "$wnet" = "$network" ]; then
30 append radio_devs
"$wdev" "$N"
37 config_foreach find_related_radios wifi-iface
40 for dev
in $
(echo "$radio_devs" |
sort -u); do
48 config_get ifname
"$1" device
49 for dev
in ${ifname:-$1}; do
50 setup_interface
"$dev" "$1"