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: Yousong Zhou <yszhou4tech@gmail.com>
This commit is contained in:
parent
5f9e367127
commit
fa37bdc05a
1 changed files with 6 additions and 3 deletions
|
@ -7,9 +7,12 @@ move_config() {
|
||||||
. /lib/upgrade/platform.sh
|
. /lib/upgrade/platform.sh
|
||||||
|
|
||||||
if platform_export_bootdevice && platform_export_partdevice partdev 1; then
|
if platform_export_bootdevice && platform_export_partdevice partdev 1; then
|
||||||
mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt
|
if mount -t ext4 -o rw,noatime "/dev/$partdev" /mnt; then
|
||||||
mv -f /mnt/sysupgrade.tgz /
|
if [ -f /mnt/sysupgrade.tgz ]; then
|
||||||
umount /mnt
|
mv -f /mnt/sysupgrade.tgz /
|
||||||
|
fi
|
||||||
|
umount /mnt
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue