[Fai-commit] r4716 - trunk/lib

lange at alioth.debian.org lange at alioth.debian.org
Sun Nov 11 13:00:42 UTC 2007


Author: lange
Date: 2007-11-11 13:00:42 +0000 (Sun, 11 Nov 2007)
New Revision: 4716

Modified:
   trunk/lib/subroutines
Log:
add second optional parameter to task_error()


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2007-11-11 12:49:00 UTC (rev 4715)
+++ trunk/lib/subroutines	2007-11-11 13:00:42 UTC (rev 4716)
@@ -106,13 +106,14 @@
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ### BEGIN SUBROUTINE INFO
 # Provides-Var:      $task_error
-# Required-Var:      $task_error
-# Short-Description: save the maximum error code
+# Required-Var:      $1 $2 $task_error
+# Short-Description: save the maximum error code,
+# Short-Description: $1 is the error that will be saved unless $2 is zero
 ### END SUBROUTINE INFO
 
 task_error() {
 
-    [ $1 -eq 0 ] && return
+    [ X$2 = X0 ] && return
     echo "Error $1. Traceback: ${FUNCNAME[*]}"
     [ $1 -gt $task_error ] && $task_error=$1
     [ $task_error -gt $STOP_ON_ERROR ] && stop_fai_installation




More information about the Fai-commit mailing list