From 51a57799cd73706c8905b4736b6023954193adc0 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Sun, 16 Jun 2019 15:04:56 +0200 Subject: archbuild.in: umount -l left-over mounts inside the to-be-deleted chroot --- src/archbuild.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/archbuild.in b/src/archbuild.in index 72d8005..a5eb9a0 100644 --- a/src/archbuild.in +++ b/src/archbuild.in @@ -77,6 +77,12 @@ if ${clean_first} || [[ ! -d "${chroots}/${repo}-${arch}" ]]; then lock 9 "$copy.lock" "Locking chroot copy '%s'" "$copy" subvolume_delete_recursive "${copy}" + find "${copy}" \ + -mindepth 1 \ + -type d \ + -exec mountpoint -q {} \; \ + -prune \ + -exec umount -l {} \; rm -rf --one-file-system "${copy}" done lock_close 9 -- cgit v1.2.3-70-g09d2