[Fai-commit] r5020 - trunk/bin

lange at alioth.debian.org lange at alioth.debian.org
Sun Aug 10 09:53:49 UTC 2008


Author: lange
Date: 2008-08-10 09:53:48 +0000 (Sun, 10 Aug 2008)
New Revision: 5020

Modified:
   trunk/bin/make-fai-nfsroot
Log:
move trap definitions outside of { } block


Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot	2008-08-10 09:35:50 UTC (rev 5019)
+++ trunk/bin/make-fai-nfsroot	2008-08-10 09:53:48 UTC (rev 5020)
@@ -109,8 +109,6 @@
     exit 9
 fi
 
-{ # start of block which output will be written to log file
-
 set -e
 
 # use FAI_ETC_DIR from environment variable
@@ -153,9 +151,6 @@
 mkdir -p $RUNDIR
 export DEBIAN_FRONTEND=noninteractive
 [ "$recover" ] || rm -rf $RUNDIR/*
-
-trap 'echo "Aborting";umount_dirs' EXIT
-trap "bad_exit" ERR
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 bad_exit() {
 
@@ -463,6 +458,10 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - -
 # main routine
 
+trap 'echo "Aborting";umount_dirs' EXIT
+trap "bad_exit" ERR
+{
+
 # remove all kernels from nfsroot
 [ -n "$kremove" ] && {
     echo "Removing all kernels from NFSROOT."
@@ -520,8 +519,8 @@
 run_hooks
 check_nfsroot
 umount_dirs
-trap "true" EXIT
 echo "make-fai-nfsroot finished $merror."
 exit 0
 } 2>&1 | tee /var/log/fai/make-fai-nfsroot.log
+trap "true" EXIT
 echo "Log file written to /var/log/fai/make-fai-nfsroot.log"




More information about the Fai-commit mailing list