[Fai-commit] r6682 - trunk/bin

Thomas Lange lange at alioth.debian.org
Mon Oct 10 13:13:20 UTC 2011


Author: lange
Date: 2011-10-10 13:13:20 +0000 (Mon, 10 Oct 2011)
New Revision: 6682

Modified:
   trunk/bin/make-fai-nfsroot
Log:
add variable $exitcode


Modified: trunk/bin/make-fai-nfsroot
===================================================================
--- trunk/bin/make-fai-nfsroot	2011-10-10 13:12:13 UTC (rev 6681)
+++ trunk/bin/make-fai-nfsroot	2011-10-10 13:13:20 UTC (rev 6682)
@@ -81,6 +81,7 @@
 PATH=/usr/local/bin:/usr/local/sbin:/bin:/sbin:/usr/bin:/usr/sbin
 
 merror="properly"
+exitcode=0
 sshpreserve=0
 
 # option e currently does nothing
@@ -146,6 +147,7 @@
 bad_exit() {
 
     merror="with errors"
+    exitcode=1
     echo "An error occured during make-fai-nfsroot."
     echo "Please fix the error or try make-fai-nfsroot -v"
 }
@@ -479,7 +481,7 @@
     umount_dirs
     trap "true" EXIT
     echo "make-fai-nfsroot finished $merror."
-    exit 0
+    exit $exitcode
 }
 
 # repeat message, so it will appear in the log file
@@ -518,7 +520,7 @@
     [ $? -eq 0 ] &&  echo "xz compression of $NFSROOT/var/tmp/base.tar is still running in the background."
 fi
 echo "make-fai-nfsroot finished $merror."
-exit 0
+exit $exitcode
 } 2>&1 | tee -a /var/log/fai/make-fai-nfsroot.log
 umount_dirs
 trap "true" EXIT




More information about the Fai-commit mailing list