diff --git a/matter-chroot/main.sh b/matter-chroot/main.sh index 754c619..8ca2746 100755 --- a/matter-chroot/main.sh +++ b/matter-chroot/main.sh @@ -68,7 +68,8 @@ chrt() { local ret_code=$? # kill procs that may prevent umount - killall -9 dirmngr 2> /dev/null + killall -9 keyboxd 2> /dev/null + killall -9 dirmngr 2> /dev/null killall -9 gpg-agent 2> /dev/null umount "${target}/proc" diff --git a/matter-iso/main.sh b/matter-iso/main.sh index 6df43f6..281089b 100755 --- a/matter-iso/main.sh +++ b/matter-iso/main.sh @@ -43,9 +43,21 @@ check_retc() { clean_tmpdir(){ if [ -d "${tmpdir}" ]; then + unset_indent info "Cleaning up temp directory" + set_indent + for d in "${tmpdir}/"*; do + if mountpoint -q -- "${d}"; then + error "Failed: ${d} is still mounted" + unset_indent + return 1 + fi + done rm -rf "${tmpdir}" + success "Completed" fi + unset_indent + return 0 } check_iso_vars() {