From 541dc716929435ec8d050ec8fd3c21bf865d2fb1 Mon Sep 17 00:00:00 2001 From: Igor Pecovnik Date: Thu, 3 Jun 2021 21:38:57 +0000 Subject: [PATCH] Fixes for rootfs cache creation --- lib/debootstrap.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/debootstrap.sh b/lib/debootstrap.sh index 96dfa46be8..732097acb9 100644 --- a/lib/debootstrap.sh +++ b/lib/debootstrap.sh @@ -79,11 +79,11 @@ debootstrap_ng() fi # stage: unmount tmpfs - umount $SDCARD 2>&1 + umount_chroot "$SDCARD" if [[ $use_tmpfs = yes ]]; then while grep -qs "$SDCARD" /proc/mounts do - umount $SDCARD + umount_chroot "$SDCARD" sleep 5 done fi @@ -149,7 +149,7 @@ create_rootfs_cache() # speed up checking if [[ -n "$ROOT_FS_CREATE_ONLY" ]]; then touch $cache_fname.current - [[ $use_tmpfs = yes ]] && umount $SDCARD + umount --lazy "$SDCARD" rm -rf $SDCARD # remove exit trap trap - INT TERM EXIT @@ -367,7 +367,7 @@ create_rootfs_cache() # used for internal purposes. Faster rootfs cache rebuilding if [[ -n "$ROOT_FS_CREATE_ONLY" ]]; then - [[ $use_tmpfs = yes ]] && umount $SDCARD + umount --lazy "$SDCARD" rm -rf $SDCARD # remove exit trap trap - INT TERM EXIT