Subject: Adding unmount calls for pseudo-filesystems in Exit();.

From: Daniel Baumann <[email-masked]>
Date: Tue, 14 Oct 2008 21:44:48 +0200

---
 functions/exit.sh | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/functions/exit.sh b/functions/exit.sh
index 2d23ff7..1c24462 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -17,5 +17,10 @@ Exit ()
 		set | grep -e ^LH
 	fi
 
-	# FIXME: Add /proc et al cleanup on failure
+	# Always exit true in case we are not able to unmount
+	# (e.g. due to running processes in chroot from user customizations)
+	umount chroot/dev/pts > /dev/null 2>&1 || true
+	umount chroot/proc > /dev/null 2>&1 || true
+	umount chroot/selinux > /dev/null 2>&1 || true
+	umount chroot/sys > /dev/null 2>&1 || true
 }
-- 
cgit v1.0