diff options
author | Erich Eckner <git@eckner.net> | 2019-06-16 15:04:56 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-04-08 08:45:47 +0200 |
commit | 597c429d1b7bf24dd3b34df4597c4a3940d1c74f (patch) | |
tree | a2a50a4ecb1077832b9b4951300d49e8750ea2f9 | |
parent | 45513b8260331f86418384c2b5df191cc62e2f6d (diff) | |
download | devtools32-597c429d1b7bf24dd3b34df4597c4a3940d1c74f.tar.xz |
archbuild.in: umount -l left-over mounts inside the to-be-deleted chrootv20200407
-rw-r--r-- | archbuild.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in index b7f73a3..af064d5 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 |