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
123 warning: /usr/lib/X11/fonts
124 can't read /etc/udev/rules.d/z25_persistent-net.rules
125 /cow': No such file or directory
126 Dummy start-stop-daemon called
127 X: bytes packets errors
131 conflicts with ACPI region
132 cannot stat \`/etc/modprobe.d/\*.conf'
135 process \`kudzu' used the deprecated sysctl system call
136 PM: Resume from disk failed
137 JBD: barrier-based sync failed
138 aufs: module is from the staging directory, the quality is unknown
139 warning: linuxlogo stop runlevel arguments (none) do not match
140 insserv: warning: script .\+ missing LSB tags and overrides
141 live-premount.\+ If this fails
142 cannot read table of mounted file systems
143 error: no alternatives for
144 ERST: Error Record Serialization Table (ERST) support is initialized
145 ERST: Table is not found
146 HEST: Table not found
147 failed to stat /dev/pts
148 Failed to connect to socket /var/run/dbus/system_bus_socket
149 fail to add MMCONFIG information
150 can't initialize iptables table
151 can't initialize ip6tables table
152 Authentication warning overridden
154 Download is performed unsandboxed as root as file
155 update-alternatives: warning: skip creation of
156 loop: module verification failed: signature
157 Warning: apt-key output should not be parsed
158 WARNING: Failed to connect to lvmetad. Falling back to device scanning
159 update-rc.d: warning: start and stop actions are no longer supported"
161 # add pattern on some conditions
162 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
163 globalignorepatterns
="$globalignorepatterns
164 WARNING: untrusted versions
165 WARNING: The following packages cannot be authenticated
166 Ignoring these trust violations"
168 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
169 # Here you can define your own patterns. Put one pattern in a line,
170 # do not create empty lines.
171 myerrorpatterns
="X_X-X_XX"
172 myignorepatterns
="X_X-X_XX"
173 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
175 errorpatterns
="$globalerrorpatterns
177 ignorepatterns
="$globalignorepatterns
181 if [ -s $errfile ]; then
182 echo "Errorfile already exists. Aborting." >&2
186 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
187 if [ X
$verbose = X1
]; then
188 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
189 mv $LOGDIR/tempfile
$errfile
192 if [ -s $errfile ]; then
193 echo "ERRORS found in log files. See $errfile" >&2
195 echo "Congratulations! No errors found in log files."