[D-community-commits] r37 - trunk/fai-config-dir/hooks

Holger Levsen h01ger-guest at alioth.debian.org
Thu Mar 22 19:50:23 CET 2007


Author: h01ger-guest
Date: 2007-03-22 18:50:23 +0000 (Thu, 22 Mar 2007)
New Revision: 37

Added:
   trunk/fai-config-dir/hooks/savelog.LAST.source
Log:
parse logfiles for errors after running fai

Added: trunk/fai-config-dir/hooks/savelog.LAST.source
===================================================================
--- trunk/fai-config-dir/hooks/savelog.LAST.source	2007-03-22 18:29:42 UTC (rev 36)
+++ trunk/fai-config-dir/hooks/savelog.LAST.source	2007-03-22 18:50:23 UTC (rev 37)
@@ -0,0 +1,120 @@
+#! /bin/bash
+
+# parse all log files for error messages
+# print errors and warnings found to error.log
+# WARNING: This will only work with english error messages!
+
+errfile=$LOGDIR/error.log
+
+# Define grep patterns. Do not start or end with an empty line!
+globalerrorpatterns="error
+fail
+warn
+bad
+no space
+syntax
+Couldn't stat
+Cannot access
+is bigger than the limit
+did not exist
+non existent
+not found
+couldn't
+can't
+E: Sorry, broken packages
+operator expected
+ambiguous redirect
+No previous regular expression
+No such
+Device or resource busy
+unknown option
+[a-z]\+\.log:E: 
+No candidate version found
+segfault
+cannot create"
+
+globalignorepatterns="[a-z]\+\.log:# 
+libroxen-errormessage
+liberror-perl
+libgpg-error0
+^fstab.\+errors=remount
+[RT]X packets:
+WARNING: unexpected IO-APIC
+warned about = ( )
+daemon.warn
+kern.warn
+rw,errors=
+Expect some cache
+no error
+failmsg
+RPC call returned error 101
+deverror.out
+(floppy), sector 0
+mount version older than kernel
+Can't locate module 
+Warning only 896MB will be used.
+hostname: Host name lookup failure
+I can't tell the difference.
+warning, not much extra random data, consider using the -rand option
+confC._FILE
+Warning: 3 database(s) sources
+were not found, (but were created)
+removing exim
+The home dir you specified already exists.
+No Rule for /usr/lib/ispell/default.hash.
+/usr/sbin/update-fonts-.\+: warning: absolute path
+hostname: Unknown server error
+EXT2-fs warning: checktime reached
+RPC: sendmsg returned error 101
+can't print them to stdout. Define these classes
+warning: downgrading
+suppress emacs errors
+echo Error: 
+Can't open dependencies file
+documents in /usr/doc are no longer supported
+if you have both a SCSI and an IDE CD-ROM
+Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
+Monitoring disabled
+kernel-patch-badram
+Error: only one processor found.
+Error Recovery Strategy:
+sector 0 does not have an
+syslogin_perform_logout: logout() returned an error
+grub is not in an XFS filesystem.
+is harmless
+not updating .\+ font directory data.
+register_serial(): autoconfig failed
+Fontconfig error: Cannot load default config file
+asking for cache data failed
+However, I can not read the target:
+fai-kernels/modules.dep: No such file
+Warning: The partition table looks like it was made
+task_error=0
+^info: Trying to set 
+cdrom: open failed."
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# Here you can define your own patterns. Put one pattern in a line,
+# do not create empty lines.
+myerrorpatterns="XXXXX"
+myignorepatterns="XXXXX"
+# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
+# The main routine
+errorpatterns="$globalerrorpatterns
+$myerrorpatterns"
+ignorepatterns="$globalignorepatterns
+$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 [ -s $errfile ]; then
+   echo "ERRORS found in log files. See $errfile."
+else
+   echo "Congratulations! No errors found in log files."
+   export flag_reboot=1
+fi


Property changes on: trunk/fai-config-dir/hooks/savelog.LAST.source
___________________________________________________________________
Name: svn:executable
   + *




More information about the D-community-commits mailing list