X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/d3abc2c9f5dc2d238c17bd8764f780b38cf58491..c4f3575368c5aeef4134d82125df2814d688cc2a:/package/base-files/default/sbin/wifi diff --git a/package/base-files/default/sbin/wifi b/package/base-files/default/sbin/wifi index c983fe0df..f1ac94fa3 100755 --- a/package/base-files/default/sbin/wifi +++ b/package/base-files/default/sbin/wifi @@ -1,4 +1,6 @@ #!/bin/sh +# Copyright (C) 2006 OpenWrt.org + . /etc/functions.sh config_get_bool() { @@ -28,16 +30,11 @@ config_cb() { } config_load wireless - -[ -d /lib/wifi -a -n "$(ls /lib/wifi/*.sh 2>&-)" ] && { - for script in /lib/wifi/*.sh; do - . $script - done -} +include wifi for device in $DEVICES; do ( config_get type "$device" type - eval "type setup_$type 2>&- >&-" && { + eval "type setup_$type" 2>/dev/null >/dev/null && { eval "scan_$type '$device'" eval "setup_$type '$device'" && { # TODO: set up network settings