3 # parse all log files for error messages
4 # print errors and warnings found to error.log
5 # WARNING: This will only work with english error messages!
7 errfile
=$LOGDIR/error.log
9 # Define grep patterns. Do not start or end with an empty line!
10 globalerrorpatterns
="error
18 is bigger than the limit
24 E: Sorry, broken packages
27 No previous regular expression
29 Device or resource busy
32 No candidate version found
34 Couldn't find any package whose name or description matched
36 The following packages have unmet dependencies"
38 globalignorepatterns
="[a-z]\+\.log:#
39 Error: Driver 'pcspkr' is already registered, aborting
40 : bytes packets errors dropped
46 gstreamer0.10-plugins-bad
51 gstreamer0.10-plugins-really-bad
54 libtest-nowarnings-perl
56 libclass-errorhandler-perl
57 zope-ploneerrorreporting
62 ^fstab.\+errors=remount
64 WARNING: unexpected IO-APIC
72 RPC call returned error 101
75 mount version older than kernel
77 Warning only 896MB will be used.
78 hostname: Host name lookup failure
79 I can't tell the difference.
80 warning, not much extra random data, consider using the -rand option
82 Warning: 3 database(s) sources
83 were not found, (but were created)
85 The home dir you specified already exists.
86 No Rule for /usr/lib/ispell/default.hash.
87 /usr/sbin/update-fonts-.\+: warning: absolute path
88 hostname: Unknown server error
89 EXT2-fs warning: checktime reached
90 RPC: sendmsg returned error 101
91 can't print them to stdout. Define these classes
95 Can't open dependencies file
96 documents in /usr/doc are no longer supported
97 if you have both a SCSI and an IDE CD-ROM
98 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
100 Error: only one processor found.
101 Error Recovery Strategy:
102 sector 0 does not have an
103 syslogin_perform_logout: logout() returned an error
104 grub is not in an XFS filesystem.
105 grub-install: line 374:
106 grub-probe: error: Cannot open \`/boot/grub/device.map'
108 not updating .\+ font directory data.
109 register_serial(): autoconfig failed
110 Fontconfig error: Cannot load default config file
111 asking for cache data failed
112 However, I can not read the target:
113 fai-kernels/modules.dep: No such file
114 Warning: The partition table looks like it was made
117 warning: /usr/lib/X11/fonts
118 can't read /etc/udev/rules.d/z25_persistent-net.rules
119 /cow': No such file or directory
120 Dummy start-stop-daemon called
121 X: bytes packets errors
124 cannot stat \`/etc/modprobe.d/\*.conf'
127 # add pattern on some conditions
128 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
129 globalignorepatterns
="$globalignorepatterns
130 WARNING: untrusted versions
131 Ignoring these trust violations"
133 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
134 # Here you can define your own patterns. Put one pattern in a line,
135 # do not create empty lines.
136 myerrorpatterns
="XXXXX"
137 myignorepatterns
="XXXXX"
138 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
140 errorpatterns
="$globalerrorpatterns
142 ignorepatterns
="$globalignorepatterns
146 if [ -s $errfile ]; then
147 echo "Errorfile already exists. Aborting."
151 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
152 if [ "$verbose" ]; then
153 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
154 mv $LOGDIR/tempfile
$errfile
157 if [ -s $errfile ]; then
158 echo "ERRORS found in log files. See $errfile"
160 echo "Congratulations! No errors found in log files."