summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-16 15:04:56 +0200
committerErich Eckner <git@eckner.net>2019-10-16 06:26:55 +0200
commita33665ce2a80d723e07c50032fb3182ae0f8d689 (patch)
treeacf38c6a914b8329f09fd5e527106f8c4fe335fa
parent7409a45d683878e597ad15276280c114b3d13509 (diff)
downloaddevtools-v20191016.tar.xz
archbuild.in: umount -l left-over mounts inside the to-be-deleted chrootv20191016
-rw-r--r--archbuild.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in
index 4e16e9e..eea1f6c 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