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
20 is bigger than the limit
26 E: Sorry, broken packages
30 No previous regular expression
32 Device or resource busy
35 No candidate version found
37 Couldn't find any package whose name or description matched
39 The following packages have unmet dependencies"
41 globalignorepatterns
="[a-z]\+\.log:#
42 Error: Driver 'pcspkr' is already registered, aborting
43 : bytes packets errors dropped
50 Enabling conf localized-error-pages
55 gstreamer0.10-plugins-really-bad
60 libtest-nowarnings-perl
62 libclass-errorhandler-perl
63 zope-ploneerrorreporting
68 Opts:.\+errors=remount
70 WARNING: unexpected IO-APIC
78 RPC call returned error 101
81 mount version older than kernel
83 Warning only 896MB will be used.
84 hostname: Host name lookup failure
85 I can't tell the difference.
86 warning, not much extra random data, consider using the -rand option
88 Warning: 3 database(s) sources
89 were not found, (but were created)
91 The home dir you specified already exists.
92 No Rule for /usr/lib/ispell/default.hash.
93 /usr/sbin/update-fonts-.\+: warning: absolute path
94 hostname: Unknown server error
95 EXT2-fs warning: checktime reached
96 RPC: sendmsg returned error 101
97 can't print them to stdout. Define these classes
101 Can't open dependencies file
102 documents in /usr/doc are no longer supported
103 if you have both a SCSI and an IDE CD-ROM
104 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
106 Error: only one processor found.
107 Error Recovery Strategy:
108 sector 0 does not have an
109 syslogin_perform_logout: logout() returned an error
110 grub is not in an XFS filesystem.
111 grub-install: line 374:
112 grub-probe: error: Cannot open \`/boot/grub/device.map'
114 not updating .\+ font directory data.
115 register_serial(): autoconfig failed
116 Fontconfig error: Cannot load default config file
117 asking for cache data failed
118 However, I can not read the target:
119 Warning: The partition table looks like it was made
122 warning: /usr/lib/X11/fonts
123 can't read /etc/udev/rules.d/z25_persistent-net.rules
124 /cow': No such file or directory
125 Dummy start-stop-daemon called
126 X: bytes packets errors
130 conflicts with ACPI region
131 cannot stat \`/etc/modprobe.d/\*.conf'
134 process \`kudzu' used the deprecated sysctl system call
135 PM: Resume from disk failed
136 JBD: barrier-based sync failed
137 aufs: module is from the staging directory, the quality is unknown
138 warning: linuxlogo stop runlevel arguments (none) do not match
139 insserv: warning: script .\+ missing LSB tags and overrides
140 live-premount.\+ If this fails
141 cannot read table of mounted file systems
142 error: no alternatives for
143 ERST: Error Record Serialization Table (ERST) support is initialized
144 ERST: Table is not found
145 HEST: Table not found
146 failed to stat /dev/pts
147 Failed to connect to socket /var/run/dbus/system_bus_socket
148 fail to add MMCONFIG information
149 can't initialize iptables table
150 can't initialize ip6tables table
151 Authentication warning overridden
153 update-alternatives: warning: skip creation of
154 loop: module verification failed: signature
155 Warning: apt-key output should not be parsed
156 WARNING: Failed to connect to lvmetad. Falling back to device scanning
157 update-rc.d: warning: start and stop actions are no longer supported"
159 # add pattern on some conditions
160 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
161 globalignorepatterns
="$globalignorepatterns
162 WARNING: untrusted versions
163 Ignoring these trust violations"
165 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
166 # Here you can define your own patterns. Put one pattern in a line,
167 # do not create empty lines.
168 myerrorpatterns
="X_X-X_XX"
169 myignorepatterns
="X_X-X_XX"
170 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
172 errorpatterns
="$globalerrorpatterns
174 ignorepatterns
="$globalignorepatterns
178 if [ -s $errfile ]; then
179 echo "Errorfile already exists. Aborting." >&2
183 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
184 if [ X
$verbose = X1
]; then
185 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
186 mv $LOGDIR/tempfile
$errfile
189 if [ -s $errfile ]; then
190 echo "ERRORS found in log files. See $errfile" >&2
192 echo "Congratulations! No errors found in log files."