#
-# Copyright (C) 2007-2011 OpenWrt.org
+# Copyright (C) 2007-2012 OpenWrt.org
# Copyright (C) 2010 Vertical Communications
#
# This is free software, licensed under the GNU General Public License v2.
include $(INCLUDE_DIR)/kernel.mk
PKG_NAME:=base-files
-PKG_RELEASE:=100
+PKG_RELEASE:=101
PKG_FILE_DEPENDS:=$(PLATFORM_DIR)/ $(GENERIC_PLATFORM_DIR)/base-files/
PKG_BUILD_DEPENDS:=opkg/host
export CONF_IMAGE=
export CONF_BACKUP=
export HELP=0
+export FORCE=0
# parse options
while [ -n "$1" ]; do
-c) export SAVE_OVERLAY=1;;
-b|--create-backup) export CONF_BACKUP="$2"; shift;;
-f) export CONF_IMAGE="$2"; shift;;
+ -F|--force) export FORCE=1; shift;;
-h|--help) export HELP=1; break;;
-*)
echo "Invalid option: $1"
then exit. Does not flash an image. If file is '-',
i.e. stdout, verbosity is set to 0 (i.e. quiet).
-n do not save configuration over reflash
+ -F / --force
+ Flash image even if image checks fail, this is dangerous!
-q less verbose
-v more verbose
-h / --help display this help
for check in $sysupgrade_image_check; do
( eval "$check \"\$ARGV\"" ) || {
- echo "Image check '$check' failed."
- exit 1
+ if [ $FORCE -eq 1 ]; then
+ echo "Image check '$check' failed but --force given - will update anyway!"
+ break
+ else
+ echo "Image check '$check' failed."
+ exit 1
+ fi
}
done