From 2bb21003e64c80f370286c56953a18e3ab9ce139 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 --- archbuild.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'archbuild.in') diff --git a/archbuild.in b/archbuild.in index aed79f3..a6884a6 100644 --- a/archbuild.in +++ b/archbuild.in @@ -76,6 +76,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