From 937e93621ff972d9c89fa107648864263c016014 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Tue, 21 May 2024 12:30:28 +0200 Subject: Try fixing the umount of $LIVE_ROOTDIR Somehow gpg-agent is triggered (perhaps running mkinitrd?) and that plus child processes keboxd and scdaemon keep the mount point open. --- make_slackware_live.sh | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'make_slackware_live.sh') diff --git a/make_slackware_live.sh b/make_slackware_live.sh index e91f1a4..cfe4ca1 100755 --- a/make_slackware_live.sh +++ b/make_slackware_live.sh @@ -358,6 +358,7 @@ function cleanup() { umount ${LIVE_ROOTDIR}/sys 2>${DBGOUT} || true umount ${LIVE_ROOTDIR}/proc 2>${DBGOUT} || true umount ${LIVE_ROOTDIR}/dev 2>${DBGOUT} || true + lsof -l -n -t ${LIVE_ROOTDIR} |xargs -r kill -KILL || true umount -R ${LIVE_ROOTDIR} 2>${DBGOUT} || true # Need to umount the squashfs modules too: umount -R ${LIVE_WORK}/*_$$ 2>${DBGOUT} || true @@ -3499,6 +3500,9 @@ fi rm -rf ${LIVE_ROOTDIR}/boot/initrd-tree # ... and cleanup these mounts again: +# Also, prevent a 'target is busy' error while unmounting. +# because gpg-agent/keyboxd/scdaemon were activated and keep the mount open: +lsof -l -n -t ${LIVE_ROOTDIR} |xargs -r kill -KILL umount ${LIVE_ROOTDIR}/{proc,sys,dev} || true umount -R ${LIVE_ROOTDIR} || true # Paranoia: -- cgit v1.2.3-65-gdbad