[Fai-commit] r5582 - in trunk: debian lib

Thomas Lange lange at alioth.debian.org
Wed Oct 21 12:30:45 UTC 2009


Author: lange
Date: 2009-10-21 12:30:45 +0000 (Wed, 21 Oct 2009)
New Revision: 5582

Modified:
   trunk/debian/changelog
   trunk/lib/subroutines
Log:
  check if test.log exists before using grep

Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog	2009-10-21 09:42:46 UTC (rev 5581)
+++ trunk/debian/changelog	2009-10-21 12:30:45 UTC (rev 5582)
@@ -1,4 +1,4 @@
-fai (3.2.23~beta24) unstable; urgency=low
+fai (3.2.23~beta25) unstable; urgency=low
 
   [ Thomas Lange ]
   * NEWS: add hint about missing packages in nfsroot, changes in
@@ -17,6 +17,7 @@
     include subroutines-linux into subroutines (closes: #494377)
     if two softupdates are running, print the name of the lock file
     set trap for softupdate after checking if second instance is running
+    check if test.log exists before using grep
   * fai-class: add string warning to message
   * task_sysinfo: call blkid on all disks
   * fcopy: add die() after open command
@@ -142,7 +143,7 @@
   [ Holger Levsen ]
   * update to standards version 3.8.2, no changes needed
  
- -- Thomas Lange <lange at debian.org>  Tue, 20 Oct 2009 12:05:58 +0200
+ -- Thomas Lange <lange at debian.org>  Wed, 21 Oct 2009 14:30:20 +0200
 
 fai (3.2.20) unstable; urgency=low
 

Modified: trunk/lib/subroutines
===================================================================
--- trunk/lib/subroutines	2009-10-21 09:42:46 UTC (rev 5581)
+++ trunk/lib/subroutines	2009-10-21 12:30:45 UTC (rev 5582)
@@ -409,10 +409,12 @@
     if [ -d $FAI/tests ]; then
 	fai-do-scripts $FAI/tests  # always returns 0 atm
 	# check if any test failed
-	if grep -q "FAILED with " $LOGDIR/test.log; then
-	    sendmon "TASKERROR tests 312"
-	    task_error 312
-	    return 1
+	if [ -f $LOGDIR/test.log ]; then
+	    if grep -q "FAILED with " $LOGDIR/test.log; then
+		sendmon "TASKERROR tests 312"
+		task_error 312
+		return 1
+	    fi
 	fi
     else
 	echo "WARNING: Subdirectory tests/ not found. Cannot execute test scripts."




More information about the Fai-commit mailing list