treewide: don't hardcode "sysupgrade.tgz" file name
[openwrt/openwrt.git] / target / linux / apm821xx / base-files / lib / preinit / 79_move_config
index cb5e5c759db1fbd68a781f6c10e1c36d93d9ffd4..37d35b663b4ce40b0ea8d2eb2ff3b9d0eb424230 100644 (file)
@@ -4,13 +4,14 @@ BOOTPART=/dev/sda1
 
 move_config() {
        . /lib/functions.sh
+       . /lib/upgrade/common.sh
 
        case "$(board_name)" in
        wd,mybooklive)
                if [ -b $BOOTPART ]; then
                        mkdir -p /boot
                        mount -t ext4 -o rw,noatime $BOOTPART /boot
-                       [ -f /boot/sysupgrade.tgz ] && mv -f /boot/sysupgrade.tgz /
+                       [ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
                fi
                ;;
        *)