pmb.chroot.shutdown: be more user friendly when unmounting SD card (MR 2012)

When unmounting SD card after `pmbootstrap install --sdcard=...`
it takes a lot of time for kernel to sync filesystem cache
before actual umounting happehs. This looks like pmbootstrap is
stuck, so before doing unmount print a message to inform user of
what's happening, in case `--sdcard` was used.
This commit is contained in:
Alexey Min 2021-01-08 18:17:21 +03:00 committed by Clayton Craft
parent bc51a1c605
commit 69b7543243
No known key found for this signature in database
GPG Key ID: 7A3461CA187CEA54
1 changed files with 3 additions and 0 deletions

View File

@ -484,6 +484,9 @@ def install_system_image(args, size_reserve, suffix, step, steps,
configure_apk(args)
copy_ssh_keys(args)
embed_firmware(args, suffix)
if sdcard:
logging.info("Unmounting SD card (this may take a while "
"to sync, please wait)")
pmb.chroot.shutdown(args, True)
# Convert rootfs to sparse using img2simg