diff --git a/target/linux/mvebu/base-files/lib/preinit/79_move_config b/target/linux/mvebu/base-files/lib/preinit/79_move_config index e63fcf9a6a..c70cede350 100644 --- a/target/linux/mvebu/base-files/lib/preinit/79_move_config +++ b/target/linux/mvebu/base-files/lib/preinit/79_move_config @@ -17,7 +17,7 @@ move_config() { esac mkdir -p /boot mount -o rw,noatime "/dev/$partdev" /boot - [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" / + [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz / umount /boot fi } diff --git a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh index 184803a50f..5ca5e71fe7 100644 --- a/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh +++ b/target/linux/mvebu/base-files/lib/upgrade/sdcard.sh @@ -49,7 +49,7 @@ platform_do_upgrade_sdcard() { sync - if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then + if [ "$SAVE_PARTITIONS" = "1" ]; then get_partitions "/dev/$diskdev" bootdisk #extract the boot sector from the image @@ -106,7 +106,7 @@ platform_copy_config_sdcard() { if export_partdevice partdev 1; then mkdir -p /boot [ -f /boot/kernel.img ] || mount -o rw,noatime /dev/$partdev /boot - cp -af "$UPGRADE_BACKUP" "/boot/$BACKUP_FILE" + cp -af "$CONF_TAR" /boot/ sync umount /boot fi diff --git a/target/linux/mvebu/cortexa53/base-files/lib/preinit/82_uDPU b/target/linux/mvebu/cortexa53/base-files/lib/preinit/82_uDPU index 12bbfc3725..ae369b51d6 100644 --- a/target/linux/mvebu/cortexa53/base-files/lib/preinit/82_uDPU +++ b/target/linux/mvebu/cortexa53/base-files/lib/preinit/82_uDPU @@ -15,10 +15,10 @@ preinit_mount_udpu() { if [ -b "${mmcdev}p4" ]; then mkdir /misc mount -t f2fs ${mmcdev}p4 /misc - [ -f "/misc/$BACKUP_FILE" ] && { + [ -f /misc/sysupgrade.tgz ] && { echo "- Restoring configuration files -" - tar xzf "/misc/$BACKUP_FILE" -C / - rm -f "/misc/$BACKUP_FILE" + tar xzf /misc/sysupgrade.tgz -C / + rm -f /misc/sysupgrade.tgz" sync } [ -f "/misc/firmware/recovery.itb" ] && { diff --git a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/uDPU.sh b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/uDPU.sh index 0bb1dd12cc..8786164811 100644 --- a/target/linux/mvebu/cortexa53/base-files/lib/upgrade/uDPU.sh +++ b/target/linux/mvebu/cortexa53/base-files/lib/upgrade/uDPU.sh @@ -149,8 +149,8 @@ platform_do_upgrade_uDPU() { platform_copy_config_uDPU() { # Config is saved on the /misc partition and copied on the rootfs after the reboot - if [ -f "$UPGRADE_BACKUP" ]; then - cp -f "$UPGRADE_BACKUP" "/misc/$BACKUP_FILE" + if [ -f /tmp/sysupgrade.tgz ]; then + cp -f /tmp/sysupgrade.tgz /misc/ sync fi } diff --git a/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg b/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg index 6ebd727556..1cbb2738c2 100644 --- a/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg +++ b/target/linux/mvebu/cortexa9/base-files/lib/preinit/81_linksys_syscfg @@ -27,12 +27,12 @@ preinit_mount_syscfg() { fi mkdir /tmp/syscfg mount -t ubifs ubi1:syscfg /tmp/syscfg - [ -f "/tmp/syscfg/$BACKUP_FILE" ] && { + [ -f "/tmp/syscfg/$CONF_TAR" ] && { echo "- config restore -" cd / - mv "/tmp/syscfg/$BACKUP_FILE" /tmp - tar xzf "/tmp/$BACKUP_FILE" - rm -f "/tmp/$BACKUP_FILE" + mv "/tmp/syscfg/$CONF_TAR" /tmp + tar xzf "/tmp/$CONF_TAR" + rm -f "/tmp/$CONF_TAR" sync } ;; diff --git a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh index 6ccfdd0768..ddf24836bc 100644 --- a/target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh +++ b/target/linux/mvebu/cortexa9/base-files/lib/upgrade/linksys.sh @@ -93,6 +93,6 @@ platform_do_upgrade_linksys() { } platform_copy_config_linksys() { - cp -f "$UPGRADE_BACKUP" "/tmp/syscfg/$BACKUP_FILE" + cp -f /tmp/sysupgrade.tgz /tmp/syscfg/sysupgrade.tgz sync }