[Fai-commit] r3822 - in trunk: . lib

fai-commit at lists.alioth.debian.org fai-commit at lists.alioth.debian.org
Sun Sep 3 22:38:06 UTC 2006


Author: lange
Date: 2006-09-03 22:38:06 +0000 (Sun, 03 Sep 2006)
New Revision: 3822

Modified:
   trunk/NEWS
   trunk/lib/subroutines
   trunk/lib/subroutines-linux
Log:
rename $terror to $task_error


Modified: trunk/NEWS
===================================================================
--- trunk/NEWS	2006-09-03 22:16:45 UTC (rev 3821)
+++ trunk/NEWS	2006-09-03 22:38:06 UTC (rev 3822)
@@ -20,6 +20,7 @@
       MNTPOINT now set to /media/mirror
       SERVERINTERFACE not needed by default in make-fai-nfsroot.conf
       NFSROOT moved to make-fai-nfsroot.conf
+      terror renamed to task_error
     - all IP addresses of the install server are added to $NFSROOT/etc/hosts
     - automatic reboot if no errors are found (if error.log is empty)
     - uses discover1 for hardware detection (discover version 2 is not

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2006-09-03 22:16:45 UTC (rev 3821)
+++ trunk/lib/subroutines	2006-09-03 22:38:06 UTC (rev 3822)
@@ -93,7 +93,7 @@
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 ### BEGIN SUBROUTINE INFO
-# Provides-Var:      $terror
+# Provides-Var:      $task_error
 # Required-Var:      $LOGDIR
 # Short-Description: call a certain task
 ### END SUBROUTINE INFO
@@ -116,9 +116,9 @@
     else
 	echo "Calling task_$taskname"
 	sndmon "TASKBEGIN $taskname"
-	terror=0   # task can set this variable to indicate an error
+	task_error=0   # task can set this variable to indicate an error
 	task_$taskname
-	sndmon "TASKEND $taskname $terror"
+	sndmon "TASKEND $taskname $task_error"
     fi
     # since the subroutine is not needed any more, we can undefine it
     unset task_$taskname

Modified: trunk/lib/subroutines-linux
===================================================================
--- trunk/lib/subroutines-linux	2006-09-03 22:16:45 UTC (rev 3821)
+++ trunk/lib/subroutines-linux	2006-09-03 22:38:06 UTC (rev 3822)
@@ -160,7 +160,7 @@
 
     if [ ! -d $FAI/debconf ]; then
 	echo "Can't find debconf directory $FAI/debconf. Skipping preseeding."
-	terror=2
+	task_error=2
 	return
     fi
     fai-debconf $FAI/debconf
@@ -207,7 +207,7 @@
 	install_packages </dev/null >> $LOGDIR/software.log 2>&1
     fi
     # This almost indicates an error
-    egrep "^E:" $LOGDIR/software.log && terror=1
+    egrep "^E:" $LOGDIR/software.log && task_error=1
 }
 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 task_finish() {
@@ -246,7 +246,7 @@
 
     if [ -z "$SERVER" ] ; then
 	echo "SERVER not defined. Can't change network boot configuration"
-	terror=2
+	task_error=2
 	doexit=1
     fi
     [ $doexit -eq 1 ] && return
@@ -260,7 +260,7 @@
         # first test if rsh to server works
 	$frsh true >/dev/null 2>&1
 	if [ $? -ne 0 ]; then
-	    terror=3
+	    task_error=3
 	    echo "WARNING: $frsh failed. Can't call fai-chboot on the install server."
 	else
 	    # remove pxe config, so host will use default and boot from local disk




More information about the Fai-commit mailing list