From a9057cb8741df4839d5861c21d916cb8f56feeec Mon Sep 17 00:00:00 2001 From: ngn Date: Sun, 18 Aug 2024 21:27:51 +0300 Subject: [PATCH] update: kill keyboxd to prevent umount issues with matter-chroot --- matter-chroot/main.sh | 3 ++- matter-iso/main.sh | 12 ++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) 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() {