summaryrefslogtreecommitdiff
path: root/target/linux/x86
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/x86')
-rw-r--r--target/linux/x86/base-files/lib/preinit/79_move_config9
1 files changed, 6 insertions, 3 deletions
diff --git a/target/linux/x86/base-files/lib/preinit/79_move_config b/target/linux/x86/base-files/lib/preinit/79_move_config
index 5ac81cb..37954f0 100644
--- a/target/linux/x86/base-files/lib/preinit/79_move_config
+++ b/target/linux/x86/base-files/lib/preinit/79_move_config
@@ -7,9 +7,12 @@ move_config() {
. /lib/upgrade/platform.sh
if platform_export_bootdevice && platform_export_partdevice partdev 1; then
- mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt
- mv -f /mnt/sysupgrade.tgz /
- umount /mnt
+ if mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt; then
+ if [ -f /mnt/sysupgrade.tgz ]; then
+ mv -f /mnt/sysupgrade.tgz /
+ fi
+ umount /mnt
+ fi
fi
}