[Fai-commit] r5027 - people/eartoast/bugfix

glaweh-guest at alioth.debian.org glaweh-guest at alioth.debian.org
Sun Aug 10 11:49:51 UTC 2008


Author: glaweh-guest
Date: 2008-08-10 11:49:50 +0000 (Sun, 10 Aug 2008)
New Revision: 5027

Modified:
   people/eartoast/bugfix/savelog.LAST.source
Log:
make savelog.LAST.source idempotent (eases debugging/development):
 - ignore everything written by itself
 - do not fail in case of an already existing error.log, simply overwrite it instead


Modified: people/eartoast/bugfix/savelog.LAST.source
===================================================================
--- people/eartoast/bugfix/savelog.LAST.source	2008-08-10 11:39:01 UTC (rev 5026)
+++ people/eartoast/bugfix/savelog.LAST.source	2008-08-10 11:49:50 UTC (rev 5027)
@@ -114,6 +114,9 @@
 can't read /etc/udev/rules.d/z25_persistent-net.rules
 /cow': No such file or directory
 Dummy start-stop-daemon called
+^fai.log:ERRORS found in log files. See
+^fai.log:Congratulations! No errors found in log files.
+^error.log:
 cdrom: open failed."
 
 # add pattern on some conditions
@@ -135,10 +138,6 @@
 $myignorepatterns"
 
 cd $LOGDIR || exit 3
-if [ -s $errfile ]; then
-    echo "Errorfile already exists. Aborting."
-    exit
-fi
 
 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
 if [ "$verbose" ]; then
@@ -148,6 +147,7 @@
 
 if [ -s $errfile ]; then
    echo "ERRORS found in log files. See $errfile"
+   unset flag_reboot
 else
    echo "Congratulations! No errors found in log files."
    export flag_reboot=1




More information about the Fai-commit mailing list