treewide: when copying a backup file always specify dest name
[openwrt/openwrt.git] / target / linux / ipq806x / base-files / lib / upgrade / zyxel.sh
index 8888ec7d0465ef7ac10b40cc49e4ecaf3d102c99..e9fb0ad3886211ac346939c44e8309009620f724 100644 (file)
@@ -60,7 +60,7 @@ zyxel_do_flash() {
        mkdir /tmp/new_root
        mount -t ext4 $loopdev /tmp/new_root && {
                echo "Saving config to rootfs_data at position ${offset}."
-               cp -v "$CONF_TAR" /tmp/new_root/
+               cp -v "$CONF_TAR" "/tmp/new_root/$BACKUP_FILE"
                umount /tmp/new_root
        }