treewide: when copying a backup file always specify dest name
[openwrt/openwrt.git] / target / linux / x86 / base-files / lib / upgrade / platform.sh
index 439ba8f5125d97932248ff966340165a84e1b24a..855752b5d704401fd5a73534e89ada0c79495aa8 100644 (file)
@@ -39,7 +39,7 @@ platform_copy_config() {
 
        if export_partdevice partdev 1; then
                mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt
-               cp -af "$CONF_TAR" /mnt/
+               cp -af "$CONF_TAR" "/mnt/$BACKUP_FILE"
                umount /mnt
        fi
 }
@@ -54,7 +54,7 @@ platform_do_upgrade() {
 
        sync
 
-       if [ "$SAVE_PARTITIONS" = "1" ]; then
+       if [ "$UPGRADE_OPT_SAVE_PARTITIONS" = "1" ]; then
                get_partitions "/dev/$diskdev" bootdisk
 
                #extract the boot sector from the image