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:
Rafał Miłecki
2019-09-06 07:10:54 +02:00
parent f69b855a75
commit c53a0ed5e3
11 changed files with 12 additions and 13 deletions

View File

@@ -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