1
0
Fork 0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-06-08 15:56:23 +02:00

small cleanup

SVN-Revision: 6663
This commit is contained in:
Felix Fietkau 2007-03-24 13:42:53 +00:00
parent 535ff3f6b2
commit 2954f04b41

View File

@ -71,25 +71,29 @@ start_net() {(
setup_interface "$1" "$2"
)}
config_cb() {
config_get TYPE "$CONFIG_SECTION" TYPE
case "$TYPE" in
wifi-device)
append DEVICES "$CONFIG_SECTION"
;;
wifi-iface)
config_get device "$CONFIG_SECTION" device
config_get vifs "$device" vifs
append vifs "$CONFIG_SECTION"
config_set "$device" vifs "$vifs"
;;
esac
scan_wifi() {
local cfgfile="$1"
config_cb() {
config_get TYPE "$CONFIG_SECTION" TYPE
case "$TYPE" in
wifi-device)
append DEVICES "$CONFIG_SECTION"
;;
wifi-iface)
config_get device "$CONFIG_SECTION" device
config_get vifs "$device" vifs
append vifs "$CONFIG_SECTION"
config_set "$device" vifs "$vifs"
;;
esac
}
config_load "${cfgfile:-wireless}"
}
DEVICES=
DRIVERS=
config_load wireless
include /lib/wifi
scan_wifi
case "$1" in
down) wifi_updown "disable" "$2";;