update to upstream 5.3.4
[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 syntax
17 Couldn't stat
18 Cannot access
19 conflict
20 is bigger than the limit
21 did not exist
22 non existent
23 not found
24 couldn't
25 can't
26 E: Sorry, broken packages
27 ^E:
28 operator expected
29 ambiguous redirect
30 No previous regular expression
31 No such
32 Device or resource busy
33 unknown option
34 [a-z]\+\.log:E:
35 No candidate version found
36 segfault
37 Couldn't find any package whose name or description matched
38 cannot create
39 The following packages have unmet dependencies"
40
41 globalignorepatterns="[a-z]\+\.log:#
42 Error: Driver 'pcspkr' is already registered, aborting
43 : bytes packets errors dropped
44 :+ error=0
45 :+ trap error=
46 task_error_func=
47 STOP_ON_ERROR=
48 courier-webadmin
49 plugins-bad
50 Enabling conf localized-error-pages
51 ibwebadmin
52 kernel-patch-badram
53 kolab-webadmin
54 kolabadmin
55 gstreamer0.10-plugins-really-bad
56 liberrors.so
57 liberrors-samba
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 libgpg-error-dev
67 libgpg-error0
68 Opts:.\+errors=remount
69 [RT]X packets:
70 WARNING: unexpected IO-APIC
71 warned about = ( )
72 daemon.warn
73 kern.warn
74 rw,errors=
75 Expect some cache
76 no error
77 failmsg
78 RPC call returned error 101
79 deverror.out
80 (floppy), sector 0
81 mount version older than kernel
82 Can't locate module
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
87 confC._FILE
88 Warning: 3 database(s) sources
89 were not found, (but were created)
90 removing exim
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
98 warning: downgrading
99 suppress emacs errors
100 echo Error:
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
105 Monitoring disabled
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'
113 is harmless
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
120 task_error=0
121 ^info: Trying to set
122 warning: /usr/lib/X11/fonts
123 can't read /etc/udev/rules.d/z25_persistent-net.rules
124 /cow': No such file or directory
125 Dummy start-stop-daemon called
126 X: bytes packets errors
127 ACPI Error
128 ACPI Warning
129 AE_NOT_FOUND
130 conflicts with ACPI region
131 cannot stat \`/etc/modprobe.d/\*.conf'
132 cdrom: open failed.
133 libgpg-error
134 process \`kudzu' used the deprecated sysctl system call
135 PM: Resume from disk failed
136 JBD: barrier-based sync failed
137 aufs: module is from the staging directory, the quality is unknown
138 warning: linuxlogo stop runlevel arguments (none) do not match
139 insserv: warning: script .\+ missing LSB tags and overrides
140 live-premount.\+ If this fails
141 cannot read table of mounted file systems
142 error: no alternatives for
143 ERST: Error Record Serialization Table (ERST) support is initialized
144 ERST: Table is not found
145 HEST: Table not found
146 failed to stat /dev/pts
147 Failed to connect to socket /var/run/dbus/system_bus_socket
148 fail to add MMCONFIG information
149 can't initialize iptables table
150 can't initialize ip6tables table
151 Authentication warning overridden
152 41-warning.sh
153 update-alternatives: warning: skip creation of
154 loop: module verification failed: signature
155 Warning: apt-key output should not be parsed
156 WARNING: Failed to connect to lvmetad. Falling back to device scanning
157 update-rc.d: warning: start and stop actions are no longer supported"
158
159 # add pattern on some conditions
160 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
161 globalignorepatterns="$globalignorepatterns
162 WARNING: untrusted versions
163 Ignoring these trust violations"
164 fi
165 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
166 # Here you can define your own patterns. Put one pattern in a line,
167 # do not create empty lines.
168 myerrorpatterns="X_X-X_XX"
169 myignorepatterns="X_X-X_XX"
170 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
171 # The main routine
172 errorpatterns="$globalerrorpatterns
173 $myerrorpatterns"
174 ignorepatterns="$globalignorepatterns
175 $myignorepatterns"
176
177 cd $LOGDIR || exit 3
178 if [ -s $errfile ]; then
179 echo "Errorfile already exists. Aborting." >&2
180 exit
181 fi
182
183 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
184 if [ X$verbose = X1 ]; then
185 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
186 mv $LOGDIR/tempfile $errfile
187 fi
188
189 if [ -s $errfile ]; then
190 echo "ERRORS found in log files. See $errfile" >&2
191 else
192 echo "Congratulations! No errors found in log files."
193 fi