adds a --help option to /sbin/wifi
authorFlorian Fainelli <florian@openwrt.org>
Sun, 5 Dec 2010 11:22:56 +0000 (11:22 +0000)
committerFlorian Fainelli <florian@openwrt.org>
Sun, 5 Dec 2010 11:22:56 +0000 (11:22 +0000)
Signed-off-by: Sebastian Philipp <sebastian@spawnhost.de>
SVN-Revision: 24258

package/base-files/Makefile
package/base-files/files/sbin/wifi

index 9ed6d9939bcd8c6c98ad7d47e8ed2c021ccda9d5..cdf08e97c079347969b9d39464c015ac3368f87f 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=61
+PKG_RELEASE:=62
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index bee6c28352946f2256d8ea025c70a92e054c4f8a..e2dd0a32d560fddc552eee6be66786aa9ed099ac 100755 (executable)
@@ -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