[Fai-commit] r4688 - trunk/lib

lange at alioth.debian.org lange at alioth.debian.org
Sat Nov 10 17:23:21 UTC 2007


Author: lange
Date: 2007-11-10 17:23:21 +0000 (Sat, 10 Nov 2007)
New Revision: 4688

Modified:
   trunk/lib/subroutines
Log:
add stop_fai_installation()


Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2007-11-10 17:20:52 UTC (rev 4687)
+++ trunk/lib/subroutines	2007-11-10 17:23:21 UTC (rev 4688)
@@ -96,6 +96,14 @@
     done
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+stop_fai_installation() {
+
+    # this subroutine should directly stop the installation process
+    echo "FATAL ERROR. Installation stopped."
+    echo "Currently I do not know how to stop."
+    exit 9999
+}
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ### BEGIN SUBROUTINE INFO
 # Provides-Var:      $task_error
 # Required-Var:      $task_error
@@ -107,6 +115,7 @@
     [ $1 -eq 0 ] && return
     echo "Error $1. Traceback: ${FUNCNAME[*]}"
     [ $1 -gt $task_error ] && $task_error=$1
+    [ $task_error -gt $STOP_ON_ERROR ] && stop_fai_installation
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ### BEGIN SUBROUTINE INFO




More information about the Fai-commit mailing list