treewide: when copying a backup file always specify dest name
[openwrt/openwrt.git] / target / linux / apm821xx / base-files / lib / upgrade / wdbook.sh
index 01327d926a52586c0c8a21131be6877aae84cafa..e3de6ed0b57c0a2c9339cb019bd26822e08da5a5 100644 (file)
@@ -88,7 +88,7 @@ mbl_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
 }