mirror of
https://github.com/openwrt/openwrt.git
synced 2025-03-13 07:54:14 +00:00
base-files: sysupgrade: Add new option -s to perform upgrade on current partition
Add new option to be able to perform upgrade on current partition for dual firmware devices: "-s stay on current partition (for dual firmware devices)" Signed-off-by: Paweł Owoc <frut3k7@gmail.com> Link: https://github.com/openwrt/openwrt/pull/14720 Signed-off-by: Robert Marko <robimarko@gmail.com>
This commit is contained in:
parent
807074309d
commit
389ecee729
@ -20,6 +20,7 @@ CONF_IMAGE=
|
|||||||
CONF_BACKUP_LIST=0
|
CONF_BACKUP_LIST=0
|
||||||
CONF_BACKUP=
|
CONF_BACKUP=
|
||||||
CONF_RESTORE=
|
CONF_RESTORE=
|
||||||
|
USE_CURR_PART=0
|
||||||
NEED_IMAGE=
|
NEED_IMAGE=
|
||||||
HELP=0
|
HELP=0
|
||||||
TEST=0
|
TEST=0
|
||||||
@ -50,6 +51,7 @@ while [ -n "$1" ]; do
|
|||||||
-r|--restore-backup) CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
|
-r|--restore-backup) CONF_RESTORE="$2" NEED_IMAGE=1; shift;;
|
||||||
-l|--list-backup) CONF_BACKUP_LIST=1;;
|
-l|--list-backup) CONF_BACKUP_LIST=1;;
|
||||||
-f) CONF_IMAGE="$2"; shift;;
|
-f) CONF_IMAGE="$2"; shift;;
|
||||||
|
-s) USE_CURR_PART=1;;
|
||||||
-F|--force) export FORCE=1;;
|
-F|--force) export FORCE=1;;
|
||||||
-T|--test) TEST=1;;
|
-T|--test) TEST=1;;
|
||||||
-h|--help) HELP=1; break;;
|
-h|--help) HELP=1; break;;
|
||||||
@ -79,6 +81,7 @@ upgrade-option:
|
|||||||
-p do not attempt to restore the partition table after flash.
|
-p do not attempt to restore the partition table after flash.
|
||||||
-k include in backup a list of current installed packages at
|
-k include in backup a list of current installed packages at
|
||||||
$INSTALLED_PACKAGES
|
$INSTALLED_PACKAGES
|
||||||
|
-s stay on current partition (for dual firmware devices)
|
||||||
-T | --test
|
-T | --test
|
||||||
Verify image and config .tar.gz but do not actually flash.
|
Verify image and config .tar.gz but do not actually flash.
|
||||||
-F | --force
|
-F | --force
|
||||||
@ -424,6 +427,7 @@ else
|
|||||||
json_add_string command "$COMMAND"
|
json_add_string command "$COMMAND"
|
||||||
json_add_object options
|
json_add_object options
|
||||||
json_add_int save_partitions "$SAVE_PARTITIONS"
|
json_add_int save_partitions "$SAVE_PARTITIONS"
|
||||||
|
[ $USE_CURR_PART -eq 1 ] && json_add_boolean use_curr_part 1
|
||||||
json_close_object
|
json_close_object
|
||||||
|
|
||||||
ubus call system sysupgrade "$(json_dump)"
|
ubus call system sysupgrade "$(json_dump)"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user