update: kill keyboxd to prevent umount issues with matter-chroot

This commit is contained in:
ngn 2024-08-18 21:27:51 +03:00
parent 0f5d426f56
commit a9057cb874
2 changed files with 14 additions and 1 deletions

View File

@ -68,7 +68,8 @@ chrt() {
local ret_code=$? local ret_code=$?
# kill procs that may prevent umount # 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 killall -9 gpg-agent 2> /dev/null
umount "${target}/proc" umount "${target}/proc"

View File

@ -43,9 +43,21 @@ check_retc() {
clean_tmpdir(){ clean_tmpdir(){
if [ -d "${tmpdir}" ]; then if [ -d "${tmpdir}" ]; then
unset_indent
info "Cleaning up temp directory" 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}" rm -rf "${tmpdir}"
success "Completed"
fi fi
unset_indent
return 0
} }
check_iso_vars() { check_iso_vars() {