[Fai-commit] r4733 - trunk/lib

lange at alioth.debian.org lange at alioth.debian.org
Tue Nov 13 17:33:42 UTC 2007


Author: lange
Date: 2007-11-13 17:33:41 +0000 (Tue, 13 Nov 2007)
New Revision: 4733

Modified:
   trunk/lib/subroutines
Log:
fix syntax error, prit exit code unless it's 0


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2007-11-13 16:21:26 UTC (rev 4732)
+++ trunk/lib/subroutines	2007-11-13 17:33:41 UTC (rev 4733)
@@ -115,7 +115,7 @@
 
     [ X$2 = X0 ] && return
     echo "Error $1. Traceback: ${FUNCNAME[*]}"
-    [ $1 -gt $task_error ] && $task_error=$1
+    [ $1 -gt $task_error ] && task_error=$1
     [ $task_error -gt $STOP_ON_ERROR ] && stop_fai_installation
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
@@ -146,6 +146,7 @@
 	task_error=0   # task can set this variable to indicate an error
 	task_$taskname
 	sendmon "TASKEND $taskname $task_error"
+	[ "$task_error" -ne 0 ] && echo "Exit code task_$taskname: $task_error"
     fi
     # since the subroutine is not needed any more, we can undefine it
     unset task_$taskname




More information about the Fai-commit mailing list