summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-16 15:04:56 +0200
committerErich Eckner <git@eckner.net>2022-09-30 08:43:49 +0200
commita1abccdefbb113214d609e51d5ee685aa8ed55ce (patch)
tree7f0d147d6785b75fb411b0b14c2ba40017bdaf1e
parent4d7a2fb7d53de88054711ed355512c146514226b (diff)
downloaddevtools-a1abccdefbb113214d609e51d5ee685aa8ed55ce.tar.xz
archbuild.in: umount -l left-over mounts inside the to-be-deleted chroot
-rw-r--r--archbuild.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in
index 72d8005..a5eb9a0 100644
--- a/archbuild.in
+++ b/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