summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2019-06-16 15:04:56 +0200
committerErich Eckner <git@eckner.net>2020-06-29 10:43:34 +0200
commitce4d7e1b68b634e77151411c7a7b229fc1e9cf34 (patch)
tree7a3f1166833f541a9cf12604323fe1eda5badd9a
parentaecc3474e47d8d2fec6be19e9500481bec8a1f4a (diff)
downloaddevtools32-ce4d7e1b68b634e77151411c7a7b229fc1e9cf34.tar.xz
archbuild.in: umount -l left-over mounts inside the to-be-deleted chrootv20200629
-rw-r--r--archbuild.in6
1 files changed, 6 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in
index e7733c8..827ee66 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