treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
Now that $UPGRADE_BACKUP is set conditionally there is no need to check
the $UPGRADE_OPT_SAVE_CONFIG anymore. All conditions can be simplified.
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
(cherry picked from commit a858db3136)
This commit is contained in:
@@ -74,7 +74,7 @@ platform_do_upgrade_openmesh() {
|
||||
#
|
||||
|
||||
# take care of restoring a saved config
|
||||
[ "$UPGRADE_OPT_SAVE_CONFIG" -eq 1 ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
[ -n "$UPGRADE_BACKUP" ] && restore_backup="${MTD_CONFIG_ARGS} -j ${UPGRADE_BACKUP}"
|
||||
|
||||
mtd -q erase inactive
|
||||
tar xf $tar_file ${board_dir}/root -O | mtd -n -p $kernel_length $restore_backup write - $PART_NAME
|
||||
|
||||
Reference in New Issue
Block a user