init: unmount /update after a failed update

This commit is contained in:
MilhouseVH 2019-10-17 18:13:07 +01:00
parent 3524972190
commit a233e7936a

View File

@ -677,6 +677,8 @@ check_out_of_space() {
do_cleanup() {
StartProgress spinner "Cleaning up... "
umount /update 2>/dev/null
if [ -d $UPDATE_ROOT/.tmp/mnt ]; then
if mountpoint -q $UPDATE_ROOT/.tmp/mnt ; then
# busybox umount deletes loop device automatically
@ -938,7 +940,6 @@ check_update() {
umount /sysroot
update_file "System" "$UPDATE_SYSTEM" "/flash/$IMAGE_SYSTEM"
update_bootloader
umount /update
do_cleanup
do_reboot
}