summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Baumann <daniel@debian.org>2007-11-11 15:44:24 +0100
committerDaniel Baumann <daniel@debian.org>2011-03-09 18:22:29 +0100
commit041a0544625386608d1550e4d08a60fd614f6ebb (patch)
tree31f8a6af04026a69d1caac0edd5dcbf4211fa20a
parentf2e96d49eb9f818c9f98d62137eed91c63ef21bb (diff)
downloadlive-build-041a0544625386608d1550e4d08a60fd614f6ebb.zip
live-build-041a0544625386608d1550e4d08a60fd614f6ebb.tar.gz
Improving trap call to unmount pseudo filesystem when failing as suggested by Justin Pryzby <jpryzby@quoininc.com>.
-rwxr-xr-xfunctions/lockfile.sh2
1 files changed, 1 insertions, 1 deletions
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}"