Skip to content
Snippets Groups Projects
Commit fa37bdc0 authored by Yousong Zhou's avatar Yousong Zhou Committed by Felix Fietkau
Browse files

x86: move sysupgrade.tgz only if it exists


To squash error messages at boot time

    mv: can't rename '/mnt/sysupgrade.tgz': No such file or directory

Signed-off-by: default avatarYousong Zhou <yszhou4tech@gmail.com>
parent 5f9e3671
No related branches found
No related tags found
No related merge requests found
......@@ -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
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment