aboutsummaryrefslogtreecommitdiffstats
path: root/make_slackware_live.sh
diff options
context:
space:
mode:
Diffstat (limited to '')
-rwxr-xr-xmake_slackware_live.sh4
1 files changed, 4 insertions, 0 deletions
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: