treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
[openwrt/openwrt.git] / target / linux / ar71xx / base-files / lib / upgrade / platform.sh
index 726163291dd9b2889d140d8811c15102c54dcc0e..86e7b6386b6fd05863e0cc243ca481df8bebd643 100755 (executable)
@@ -65,7 +65,7 @@ platform_do_upgrade_combined() {
        then
                local rootfspart=$(platform_find_rootfspart "$partitions" "$kernelpart")
                local append=""
-               [ -f "$UPGRADE_BACKUP" -a "$UPGRADE_OPT_SAVE_CONFIG" -eq 1 ] && append="-j $UPGRADE_BACKUP"
+               [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUP"
 
                if [ "$PLATFORM_DO_UPGRADE_COMBINED_SEPARATE_MTD" -ne 1 ]; then
                    ( dd if="$1" bs=$CI_BLKSZ skip=1 count=$kern_blocks 2>/dev/null; \
@@ -164,7 +164,7 @@ platform_do_upgrade_compex() {
 
        if [ -n "$fw_mtd" ] &&  [ ${fw_blocks:-0} -gt 0 ]; then
                local append=""
-               [ -f "$UPGRADE_BACKUP" -a "$UPGRADE_OPT_SAVE_CONFIG" -eq 1 ] && append="-j $UPGRADE_BACKUPs"
+               [ -f "$UPGRADE_BACKUP" ] && append="-j $UPGRADE_BACKUPs"
 
                sync
                dd if="$fw_file" bs=64k skip=1 count=$fw_blocks 2>/dev/null | \