update upstream to 9084a3cbc0a55422beea4a55b530c1f03a910617 feb 2024
[automated-distro-installer] / fai / config / hooks / savelog.LAST.sh
1 #! /bin/bash
2
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!
6
7 errfile=$LOGDIR/error.log
8
9 # Define grep patterns. Do not start or end with an empty line!
10 globalerrorpatterns="error
11 fail
12 warn
13 bad
14 bad
15 no space
16 Couldn't stat
17 Cannot access
18 conflict
19 is bigger than the limit
20 did not exist
21 non existent
22 not found
23 couldn't
24 can't
25 E: Sorry, broken packages
26 ^E:
27 operator expected
28 ambiguous redirect
29 No previous regular expression
30 No such
31 Device or resource busy
32 unknown option
33 [a-z]\+\.log:E:
34 No candidate version found
35 segfault
36 Couldn't find any package whose name or description matched
37 cannot create
38 The following packages have unmet dependencies"
39
40 globalignorepatterns="[a-z]\+\.log:#
41 Error: Driver 'pcspkr' is already registered, aborting
42 : bytes packets errors dropped
43 :+ error=0
44 :+ trap error=
45 task_error_func=
46 STOP_ON_ERROR=
47 courier-webadmin
48 plugins-bad
49 Enabling conf localized-error-pages
50 ibwebadmin
51 kernel-patch-badram
52 kolab-webadmin
53 kolabadmin
54 gstreamer.\+-plugins-really-bad
55 liberrors.so
56 liberrors-samba
57 libsamba-errors
58 gsambad
59 libad
60 libtest-nowarnings-perl
61 libtest-warn-perl
62 libclass-errorhandler-perl
63 zope-ploneerrorreporting
64 libroxen-errormessage
65 liberror-perl
66 perl-Error
67 libgpg-error-dev
68 libgpg-error0
69 Opts:.\+errors=remount
70 [RT]X packets:
71 WARNING: unexpected IO-APIC
72 warned about = ( )
73 daemon.warn
74 kern.warn
75 rw,errors=
76 Expect some cache
77 no error
78 failmsg
79 RPC call returned error 101
80 deverror.out
81 (floppy), sector 0
82 mount version older than kernel
83 Can't locate module
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
88 confC._FILE
89 Warning: 3 database(s) sources
90 were not found, (but were created)
91 removing exim
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
99 warning: downgrading
100 suppress emacs errors
101 echo Error:
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
106 Monitoring disabled
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'
114 is harmless
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
121 task_error=0
122 task_local_error=0
123 ^info: Trying to set
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
129 ACPI Error
130 ACPI Warning
131 AE_NOT_FOUND
132 conflicts with ACPI region
133 cannot stat \`/etc/modprobe.d/\*.conf'
134 cdrom: open failed.
135 libgpg-error
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
154 41-warning.sh
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
165 errors: 0
166 0 errors
167 Memory Error Correction:
168 Memory Controller 0 - Channel . Error
169 IIO RAS/Control Status/Global Errors
170 RAS: Correctable Errors collector initialized
171 __stack_chk_fail
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
180 can't claim BAR
181 disabling ASPM
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"
188
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"
195 fi
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 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
202 # The main routine
203 errorpatterns="$globalerrorpatterns
204 $myerrorpatterns"
205 ignorepatterns="$globalignorepatterns
206 $myignorepatterns"
207
208 cd $LOGDIR || exit 3
209 if [ -s $errfile ]; then
210 echo "Errorfile already exists. Aborting." >&2
211 exit
212 fi
213
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
218 fi
219
220 if [ -s $errfile ]; then
221 echo "ERRORS found in log files. See $errfile" >&2
222 else
223 echo "Congratulations! No errors found in log files."
224 # export flag_reboot=1 # if you want to reboot if no errors are found
225 fi