From bf390478727ac5f4f9d6fb684de48b8150bcec67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= Date: Wed, 4 Sep 2019 16:57:39 +0200 Subject: treewide: don't hardcode "sysupgrade.tgz" file name MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1) Add BACKUP_FILE and use it when copying an archive to be restored after sysupgrade (on the next preinit). 2) Use CONF_TAR for copying backup prepared by the /sbin/sysupgrade Signed-off-by: Rafał Miłecki --- target/linux/sunxi/base-files/lib/preinit/79_move_config | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'target/linux/sunxi/base-files') diff --git a/target/linux/sunxi/base-files/lib/preinit/79_move_config b/target/linux/sunxi/base-files/lib/preinit/79_move_config index 83171b3ba9..74caee8a8a 100644 --- a/target/linux/sunxi/base-files/lib/preinit/79_move_config +++ b/target/linux/sunxi/base-files/lib/preinit/79_move_config @@ -8,8 +8,8 @@ move_config() { if export_bootdevice && export_partdevice partdev 1; then if mount -t vfat -o rw,noatime "/dev/$partdev" /mnt; then - if [ -f /mnt/sysupgrade.tgz ]; then - mv -f /mnt/sysupgrade.tgz / + if [ -f "/mnt/$BACKUP_FILE" ]; then + mv -f "/mnt/$BACKUP_FILE" / fi umount /mnt fi -- cgit v1.2.3