From 041a0544625386608d1550e4d08a60fd614f6ebb Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Sun, 11 Nov 2007 15:44:24 +0100
Subject: Improving trap call to unmount pseudo filesystem when failing as
 suggested by Justin Pryzby <jpryzby@quoininc.com>.

---
 functions/lockfile.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/functions/lockfile.sh b/functions/lockfile.sh
index 189d0c2..aa30222 100755
--- a/functions/lockfile.sh
+++ b/functions/lockfile.sh
@@ -30,7 +30,7 @@ Create_lockfile ()
 	mkdir -p "${DIRECTORY}"
 
 	# Creating lock trap
-	trap 'ret=${?}; '"rm -f \"${FILE}\";"' exit ${ret}' EXIT
+	trap 'ret=${?}; '"rm -f \"${FILE}\"; for FILESYSTEM in devpts proc sys; do lh_chroot_${FILESYSTEM} remove || continue; done"' exit ${ret}' EXIT
 
 	# Creating lock file
 	touch "${FILE}"
-- 
cgit v1.0