Adjust trap handling to get clean exit.
[grml-live.git] / grml-live
index ce38987..85b001c 100755 (executable)
--- a/grml-live
+++ b/grml-live
@@ -20,7 +20,8 @@ else
 fi
 
 # exit on any error:
-set -e
+# disable for now since it seems to cause some problems
+# set -e
 
 # global variables
 GRML_LIVE_VERSION='0.14.1'
@@ -154,6 +155,7 @@ bailout() {
   exit "$EXIT"
 }
 trap bailout 1 2 3 3 6 9 14 15
+trap umount_all EXIT
 # }}}
 
 # log file stuff {{{
@@ -557,6 +559,7 @@ else
       # Remove all FAI logs from chroot if class RELEASE is used:
       if [ -f "$CHROOT_OUTPUT"/etc/grml_fai_release ] ; then
          rm -rf "$CHROOT_OUTPUT"/var/log/fai/*
+         rm -f "$CHROOT_OUTPUT"/var/log/install_packages.list
       fi
 
       umount_all