[backfire] backport r27630
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jul 2011 09:29:17 +0000 (09:29 +0000)
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>
Sun, 17 Jul 2011 09:29:17 +0000 (09:29 +0000)
git-svn-id: svn://svn.openwrt.org/openwrt/branches/backfire@27631 3c298f89-4303-0410-b956-a3cf2f4a3e73

package/base-files/Makefile
package/base-files/files/sbin/sysupgrade

index 8ac4b72b11ad5b5ac5aac4970679bece8068b14b..6aaf1db6b376b023d10d1ce58148cfae08a18fb7 100644 (file)
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=base-files
-PKG_RELEASE:=43.21
+PKG_RELEASE:=43.22
 
 PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
 PKG_BUILD_DEPENDS:=opkg/host
index cae59dc6b85e4f227d6e6c0328a734cbad63581d..0597752bd3583af1d24f4c9efc3239b76d08c3d5 100755 (executable)
@@ -9,6 +9,8 @@ export VERBOSE=1
 export SAVE_CONFIG=1
 export DELAY=
 export CONF_IMAGE=
+export HELP=0
+
 # parse options
 while [ -n "$1" ]; do 
        case "$1" in
@@ -18,6 +20,7 @@ while [ -n "$1" ]; do
                -q) export VERBOSE="$(($VERBOSE - 1))";;
                -n) export SAVE_CONFIG=0;;
                -f) export CONF_IMAGE="$2"; shift;;
+               -h|--help) export HELP=1; break;;
                -*)
                        echo "Invalid option: $1"
                        exit 1
@@ -33,7 +36,7 @@ export CONF_TAR=/tmp/sysupgrade.tgz
 export ARGV="$*"
 export ARGC="$#"
 
-[ -z "$ARGV" ] && {
+[ -z "$ARGV" -o $HELP -gt 0 ] && {
        cat <<EOF
 Usage: $0 [options] <image file or URL>
 
@@ -44,6 +47,7 @@ Options:
        -n           do not save configuration over reflash
        -q           less verbose
        -v           more verbose
+       -h / --help  display this help
 
 EOF
        exit 1