diff options
author | Erich Eckner <git@eckner.net> | 2019-06-16 15:04:56 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2020-05-18 08:45:02 +0200 |
commit | 371508e80e71ac0e94de794a52b9b8d679f31a0a (patch) | |
tree | f38f0e2450cae208cd5db79803ebf36058962404 /archbuild.in | |
parent | 8992313292b0d7511b4a2cbd833f1a1c4d84e2bb (diff) | |
download | devtools-20200518.tar.xz |
archbuild.in: umount -l left-over mounts inside the to-be-deleted chrootv20200518
Diffstat (limited to 'archbuild.in')
-rw-r--r-- | archbuild.in | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/archbuild.in b/archbuild.in index e1f2fc2..c0c04ba 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 |