X-Git-Url: https://git.rohieb.name/openwrt.git/blobdiff_plain/098781b9c8474c4aaa9f5bfcbb3864a84df2ba40..80c7b4465b24b96dfb9c6eb48f124ce7fec01823:/package/base-files/files/sbin/wifi diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi index bee6c2835..5cbf50b5f 100755 --- a/package/base-files/files/sbin/wifi +++ b/package/base-files/files/sbin/wifi @@ -3,6 +3,14 @@ . /etc/functions.sh +usage() { + cat </dev/null - include /lib/network - scan_interfaces - setup_interface "$iface" "$config" "" "$vifmac" + [ -z "$config" ] || { + include /lib/network + scan_interfaces + setup_interface "$iface" "$config" "" "$vifmac" + } )} set_wifi_up() { @@ -183,5 +194,6 @@ scan_wifi case "$1" in down) wifi_updown "disable" "$2";; detect) wifi_detect "$2";; + --help|help) usage;; *) wifi_updown "enable" "$2";; esac