From 5611d7306ef9f6efea6e1202ab5eaa1bac6f431b Mon Sep 17 00:00:00 2001
From: Daniel Baumann <daniel@debian.org>
Date: Mon, 19 Oct 2009 13:52:54 +0200
Subject: Returning error value of the last process before exiting (Closes:
 #527331).

---
 functions/exit.sh | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/functions/exit.sh b/functions/exit.sh
index 16dda8c..bbfaf58 100755
--- a/functions/exit.sh
+++ b/functions/exit.sh
@@ -9,6 +9,8 @@
 
 Exit ()
 {
+	VALUE="${?}"
+
 	if [ "${_DEBUG}" = "enabled" ]
 	then
 		# Dump variables
@@ -22,6 +24,8 @@ Exit ()
 	do
 		umount ${DIRECTORY} > /dev/null 2>&1 || true
 	done
+
+	return ${VALUE}
 }
 
 Setup_cleanup ()
-- 
cgit v1.0