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