/[fai]/trunk/examples/simple/hooks/savelog.LAST.source
ViewVC logotype

Contents of /trunk/examples/simple/hooks/savelog.LAST.source

Parent Directory Parent Directory | Revision Log Revision Log


Revision 5602 - (show annotations) (download)
Tue Oct 27 14:16:31 2009 UTC (3 years, 6 months ago) by lange
File size: 4155 byte(s)
ignore grub-probe warning
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 no space
15 syntax
16 Couldn't stat
17 Cannot access
18 is bigger than the limit
19 did not exist
20 non existent
21 not found
22 couldn't
23 can't
24 E: Sorry, broken packages
25 operator expected
26 ambiguous redirect
27 No previous regular expression
28 No such
29 Device or resource busy
30 unknown option
31 [a-z]\+\.log:E:
32 No candidate version found
33 segfault
34 Couldn't find any package whose name or description matched
35 cannot create
36 The following packages have unmet dependencies"
37
38 globalignorepatterns="[a-z]\+\.log:#
39 Error: Driver 'pcspkr' is already registered, aborting
40 : bytes packets errors dropped
41 :+ error=0
42 :+ trap error=
43 task_error_func=
44 STOP_ON_ERROR=
45 courier-webadmin
46 gstreamer0.10-plugins-bad
47 ibwebadmin
48 kernel-patch-badram
49 kolab-webadmin
50 kolabadmin
51 gstreamer0.10-plugins-really-bad
52 gsambad
53 libad
54 libtest-nowarnings-perl
55 libtest-warn-perl
56 libclass-errorhandler-perl
57 zope-ploneerrorreporting
58 libroxen-errormessage
59 liberror-perl
60 libgpg-error-dev
61 libgpg-error0
62 ^fstab.\+errors=remount
63 [RT]X packets:
64 WARNING: unexpected IO-APIC
65 warned about = ( )
66 daemon.warn
67 kern.warn
68 rw,errors=
69 Expect some cache
70 no error
71 failmsg
72 RPC call returned error 101
73 deverror.out
74 (floppy), sector 0
75 mount version older than kernel
76 Can't locate module
77 Warning only 896MB will be used.
78 hostname: Host name lookup failure
79 I can't tell the difference.
80 warning, not much extra random data, consider using the -rand option
81 confC._FILE
82 Warning: 3 database(s) sources
83 were not found, (but were created)
84 removing exim
85 The home dir you specified already exists.
86 No Rule for /usr/lib/ispell/default.hash.
87 /usr/sbin/update-fonts-.\+: warning: absolute path
88 hostname: Unknown server error
89 EXT2-fs warning: checktime reached
90 RPC: sendmsg returned error 101
91 can't print them to stdout. Define these classes
92 warning: downgrading
93 suppress emacs errors
94 echo Error:
95 Can't open dependencies file
96 documents in /usr/doc are no longer supported
97 if you have both a SCSI and an IDE CD-ROM
98 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
99 Monitoring disabled
100 Error: only one processor found.
101 Error Recovery Strategy:
102 sector 0 does not have an
103 syslogin_perform_logout: logout() returned an error
104 grub is not in an XFS filesystem.
105 grub-install: line 374:
106 grub-probe: error: Cannot open `/boot/grub/device.map'
107 is harmless
108 not updating .\+ font directory data.
109 register_serial(): autoconfig failed
110 Fontconfig error: Cannot load default config file
111 asking for cache data failed
112 However, I can not read the target:
113 fai-kernels/modules.dep: No such file
114 Warning: The partition table looks like it was made
115 task_error=0
116 ^info: Trying to set
117 warning: /usr/lib/X11/fonts
118 can't read /etc/udev/rules.d/z25_persistent-net.rules
119 /cow': No such file or directory
120 Dummy start-stop-daemon called
121 X: bytes packets errors
122 cdrom: open failed."
123
124 # add pattern on some conditions
125 if [ -n $FAI_ALLOW_UNSIGNED ] ; then
126 globalignorepatterns="$globalignorepatterns
127 WARNING: untrusted versions
128 Ignoring these trust violations"
129 fi
130 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
131 # Here you can define your own patterns. Put one pattern in a line,
132 # do not create empty lines.
133 myerrorpatterns="XXXXX"
134 myignorepatterns="XXXXX"
135 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
136 # The main routine
137 errorpatterns="$globalerrorpatterns
138 $myerrorpatterns"
139 ignorepatterns="$globalignorepatterns
140 $myignorepatterns"
141
142 cd $LOGDIR || exit 3
143 if [ -s $errfile ]; then
144 echo "Errorfile already exists. Aborting."
145 exit
146 fi
147
148 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
149 if [ "$verbose" ]; then
150 egrep -v '^software.log:' $errfile > $LOGDIR/tempfile
151 mv $LOGDIR/tempfile $errfile
152 fi
153
154 if [ -s $errfile ]; then
155 echo "ERRORS found in log files. See $errfile"
156 else
157 echo "Congratulations! No errors found in log files."
158 export flag_reboot=1
159 fi

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.5