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
29 No previous regular expression
31 Device or resource busy
34 No candidate version found
36 Couldn't find any package whose name or description matched
38 The following packages have unmet dependencies"
40 globalignorepatterns
="[a-z]\+\.log:#
41 Error: Driver 'pcspkr' is already registered, aborting
42 : bytes packets errors dropped
49 Enabling conf localized-error-pages
54 gstreamer.\+-plugins-really-bad
60 libtest-nowarnings-perl
62 libclass-errorhandler-perl
63 zope-ploneerrorreporting
69 Opts:.\+errors=remount
71 WARNING: unexpected IO-APIC
79 RPC call returned error 101
82 mount version older than kernel
84 Warning only .\+MB will be used.
85 hostname: Host name lookup failure
86 I can't tell the difference.
87 warning, not much extra random data, consider using the -rand option
89 Warning: 3 database(s) sources
90 were not found, (but were created)
92 The home dir you specified already exists.
93 No Rule for /usr/lib/ispell/default.hash.
94 /usr/sbin/update-fonts-.\+: warning: absolute path
95 hostname: Unknown server error
96 EXT2-fs warning: checktime reached
97 RPC: sendmsg returned error 101
98 can't print them to stdout. Define these classes
100 suppress emacs errors
102 Can't open dependencies file
103 documents in /usr/doc are no longer supported
104 if you have both a SCSI and an IDE CD-ROM
105 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
107 Error: only one processor found.
108 Error Recovery Strategy:
109 sector 0 does not have an
110 syslogin_perform_logout: logout() returned an error
111 grub is not in an XFS filesystem.
112 grub-install: line 374:
113 grub-probe: error: Cannot open \`/boot/grub/device.map'
115 not updating .\+ font directory data.
116 register_serial(): autoconfig failed
117 Fontconfig error: Cannot load default config file
118 asking for cache data failed
119 However, I can not read the target:
120 Warning: The partition table looks like it was made
124 warning: /usr/lib/X11/fonts
125 can't read /etc/udev/rules.d/z25_persistent-net.rules
126 /cow': No such file or directory
127 Dummy start-stop-daemon called
128 X: bytes packets errors
132 conflicts with ACPI region
133 cannot stat \`/etc/modprobe.d/\*.conf'
136 process \`kudzu' used the deprecated sysctl system call
137 PM: Resume from disk failed
138 JBD: barrier-based sync failed
139 aufs: module is from the staging directory, the quality is unknown
140 warning: linuxlogo stop runlevel arguments (none) do not match
141 insserv: warning: script .\+ missing LSB tags and overrides
142 live-premount.\+ If this fails
143 cannot read table of mounted file systems
144 error: no alternatives for
145 ERST: Error Record Serialization Table (ERST) support is initialized
146 ERST: Table is not found
147 HEST: Table not found
148 failed to stat /dev/pts
149 Failed to connect to socket /var/run/dbus/system_bus_socket
150 fail to add MMCONFIG information
151 can't initialize iptables table
152 can't initialize ip6tables table
153 Authentication warning overridden
155 PCCT header not found
156 Download is performed unsandboxed as root as file
157 update-alternatives: warning: skip creation of
158 loop: module verification failed: signature
159 Warning: apt-key output should not be parsed
160 WARNING: Failed to connect to lvmetad. Falling back to device scanning
161 Warning: The home dir /var/lib/usbmux you specified
162 diff: /var/lib/apparmor/profiles/.apparmor.md5sums: No such file or directory
163 error reporting disabled
164 Enabling Firmware First mode for corrected errors
167 Memory Error Correction:
168 Memory Controller 0 - Channel . Error
169 IIO RAS/Control Status/Global Errors
170 RAS: Correctable Errors collector initialized
172 grub.cfg.new: Directory nonexistent
173 can't derive routing for PCI INT A
174 failed to load isci/isci_firmware.bin
175 Direct firmware load for isci/isci_firmware.bin failed with error
176 Loading user firmware failed, using default values
177 stunnel4 you specified can't be accessed: No such file or directory
178 install-docs --verbose --check file_name' may give more details about the above errors
179 cannot open '/etc/ssl/certs/java/cacerts' for reading: No such file or directory
182 data block query control method not found
183 subprocess.py.\+RuntimeWarning: line buffering
184 Resource conflict.\+ found
185 os-prober will not be executed
186 /sys/bus/usb/devices/\*:\*/bInterface
187 update-rc.d: warning: start and stop actions are no longer supported"
189 # add pattern on some conditions
190 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
191 globalignorepatterns
="$globalignorepatterns
192 WARNING: untrusted versions
193 WARNING: The following packages cannot be authenticated
194 Ignoring these trust violations"
196 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
197 # Here you can define your own patterns. Put one pattern in a line,
198 # do not create empty lines.
199 myerrorpatterns
="X_X-X_XX"
200 myignorepatterns
="X_X-X_XX"
201 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
203 errorpatterns
="$globalerrorpatterns
205 ignorepatterns
="$globalignorepatterns
209 if [ -s $errfile ]; then
210 echo "Errorfile already exists. Aborting." >&2
214 grep -i "$errorpatterns" *.log |
grep -vi "$ignorepatterns" > $errfile
215 if [ X
$verbose = X1
]; then
216 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
217 mv $LOGDIR/tempfile
$errfile
220 if [ -s $errfile ]; then
221 echo "ERRORS found in log files. See $errfile" >&2
223 echo "Congratulations! No errors found in log files."
224 # export flag_reboot=1 # if you want to reboot if no errors are found