treewide: don't hardcode "sysupgrade.tgz" file name
[openwrt/staging/wigyori.git] / target / linux / imx6 / base-files / lib / preinit / 79_move_config
index 6b66fbd42d4f9a69165a650e4ab5484becae8ccb..bdf397c4fc076e855d306e13a23759ff40c64bd6 100644 (file)
@@ -2,6 +2,7 @@
 
 . /lib/imx6.sh
 . /lib/functions.sh
+. /lib/upgrade/common.sh
 
 move_config() {
        local board=$(board_name)
@@ -10,7 +11,7 @@ move_config() {
        apalis*)
                if [ -b $(bootpart_from_uuid) ]; then
                        apalis_mount_boot
-                       [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+                       [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
                        umount /boot
                fi
                ;;