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 gstreamer.\+-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 .\+MB 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 PCCT header not found
155 Download is performed unsandboxed as root as file
156 update-alternatives: warning: skip creation of
157 loop: module verification failed: signature
158 Warning: apt-key output should not be parsed
159 WARNING: Failed to connect to lvmetad. Falling back to device scanning
160 Warning: The home dir /var/lib/usbmux you specified
161 diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory
162 update-rc.d: warning: start and stop actions are no longer supported"
164 # add pattern on some conditions
165 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
166 globalignorepatterns
="$globalignorepatterns
167 WARNING: untrusted versions
168 WARNING: The following packages cannot be authenticated
169 Ignoring these trust violations"
171 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
172 # Here you can define your own patterns. Put one pattern in a line,
173 # do not create empty lines.
174 myerrorpatterns
="X_X-X_XX"
175 myignorepatterns
="X_X-X_XX"
176 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
178 errorpatterns
="$globalerrorpatterns
180 ignorepatterns
="$globalignorepatterns
184 if [ -s $errfile ]; then
185 echo "Errorfile already exists. Aborting." >&2
189 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
190 if [ X
$verbose = X1
]; then
191 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
192 mv $LOGDIR/tempfile
$errfile
195 if [ -s $errfile ]; then
196 echo "ERRORS found in log files. See $errfile" >&2
198 echo "Congratulations! No errors found in log files."