From 7e2a7c483d5747d210e4d3989cbfdd084e2c2498 Mon Sep 17 00:00:00 2001 From: timoxa0 Date: Mon, 28 Oct 2024 00:23:25 +0500 Subject: [PATCH] build_fn: Kill gpg-agent on detach --- common.d/build_functions.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/common.d/build_functions.sh b/common.d/build_functions.sh index bb9713f..cdec159 100644 --- a/common.d/build_functions.sh +++ b/common.d/build_functions.sh @@ -138,11 +138,12 @@ detach_chroot() } rootdir=$(realpath "$1") - umount "$rootdir/proc" - umount "$rootdir/sys" - umount "$rootdir/dev/pts" - umount "$rootdir/dev/shm" - umount "$rootdir/dev" + killall gpg-agent > /dev/null 2>&1 + umount "$rootdir/proc" > /dev/null 2>&1 + umount "$rootdir/sys" > /dev/null 2>&1 + umount "$rootdir/dev/pts" > /dev/null 2>&1 + umount "$rootdir/dev/shm" > /dev/null 2>&1 + umount "$rootdir/dev" > /dev/null 2>&1 return 0 }