treewide: sysupgrade: use $UPGRADE_BACKUP to check for backup
[openwrt/openwrt.git] / target / linux / ipq40xx / base-files / lib / upgrade / openmesh.sh
index e3135620171552644b7161530d0ebeee1c3872e0..8e02186eb81b17d56d0cb8ceba95dbe506e2984b 100644 (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