From 25451f6b6dd3a2ab079bb19ac5df099ea4e7ac35 Mon Sep 17 00:00:00 2001 From: Jo-Philipp Wich Date: Sun, 17 Jul 2011 09:29:17 +0000 Subject: [PATCH] backport r27630 SVN-Revision: 27631 --- package/base-files/Makefile | 2 +- package/base-files/files/sbin/sysupgrade | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/package/base-files/Makefile b/package/base-files/Makefile index 8ac4b72b11..6aaf1db6b3 100644 --- a/package/base-files/Makefile +++ b/package/base-files/Makefile @@ -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 diff --git a/package/base-files/files/sbin/sysupgrade b/package/base-files/files/sbin/sysupgrade index cae59dc6b8..0597752bd3 100755 --- a/package/base-files/files/sbin/sysupgrade +++ b/package/base-files/files/sbin/sysupgrade @@ -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 < @@ -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 -- 2.30.2