summaryrefslogtreecommitdiffstats
path: root/package/base-files/files
diff options
context:
space:
mode:
authorflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-05 11:22:56 +0000
committerflorian <florian@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-12-05 11:22:56 +0000
commit3751e75fb0166a9955e839d3a1d760a6816690d0 (patch)
tree1e9039b3c82c8a41200c2670e1dd242b1ff4f590 /package/base-files/files
parentca6a1266f672e2814307017e95f857621f4d813d (diff)
[package] adds a --help option to /sbin/wifi
Signed-off-by: Sebastian Philipp <sebastian@spawnhost.de> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@24258 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/base-files/files')
-rwxr-xr-xpackage/base-files/files/sbin/wifi9
1 files changed, 9 insertions, 0 deletions
diff --git a/package/base-files/files/sbin/wifi b/package/base-files/files/sbin/wifi
index bee6c2835..e2dd0a32d 100755
--- a/package/base-files/files/sbin/wifi
+++ b/package/base-files/files/sbin/wifi
@@ -3,6 +3,14 @@
. /etc/functions.sh
+usage() {
+ cat <<EOF
+Usage: $0 [down|detect]
+enables (default), disables or detects a wifi configuration.
+EOF
+ exit 1
+}
+
find_net_config() {(
local vif="$1"
local cfg
@@ -183,5 +191,6 @@ scan_wifi
case "$1" in
down) wifi_updown "disable" "$2";;
detect) wifi_detect "$2";;
+ --help|help) usage;;
*) wifi_updown "enable" "$2";;
esac