/[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 4488 - (show annotations) (download)
Fri Aug 10 16:42:47 2007 UTC (5 years, 9 months ago) by lange
File size: 3184 byte(s)
add a package name
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 cannot create"
35
36 globalignorepatterns="[a-z]\+\.log:#
37 libroxen-errormessage
38 liberror-perl
39 libgpg-error-dev
40 libgpg-error0
41 ^fstab.\+errors=remount
42 [RT]X packets:
43 WARNING: unexpected IO-APIC
44 warned about = ( )
45 daemon.warn
46 kern.warn
47 rw,errors=
48 Expect some cache
49 no error
50 failmsg
51 RPC call returned error 101
52 deverror.out
53 (floppy), sector 0
54 mount version older than kernel
55 Can't locate module
56 Warning only 896MB will be used.
57 hostname: Host name lookup failure
58 I can't tell the difference.
59 warning, not much extra random data, consider using the -rand option
60 confC._FILE
61 Warning: 3 database(s) sources
62 were not found, (but were created)
63 removing exim
64 The home dir you specified already exists.
65 No Rule for /usr/lib/ispell/default.hash.
66 /usr/sbin/update-fonts-.\+: warning: absolute path
67 hostname: Unknown server error
68 EXT2-fs warning: checktime reached
69 RPC: sendmsg returned error 101
70 can't print them to stdout. Define these classes
71 warning: downgrading
72 suppress emacs errors
73 echo Error:
74 Can't open dependencies file
75 documents in /usr/doc are no longer supported
76 if you have both a SCSI and an IDE CD-ROM
77 Warning: /proc/ide/hd?/settings interface is obsolete, and will be removed soon
78 Monitoring disabled
79 kernel-patch-badram
80 Error: only one processor found.
81 Error Recovery Strategy:
82 sector 0 does not have an
83 syslogin_perform_logout: logout() returned an error
84 grub is not in an XFS filesystem.
85 is harmless
86 not updating .\+ font directory data.
87 register_serial(): autoconfig failed
88 Fontconfig error: Cannot load default config file
89 asking for cache data failed
90 However, I can not read the target:
91 fai-kernels/modules.dep: No such file
92 Warning: The partition table looks like it was made
93 task_error=0
94 ^info: Trying to set
95 warning: /usr/lib/X11/fonts
96 gstreamer0.10-plugins-bad
97 cdrom: open failed."
98 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
99 # Here you can define your own patterns. Put one pattern in a line,
100 # do not create empty lines.
101 myerrorpatterns="XXXXX"
102 myignorepatterns="XXXXX"
103 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
104 # The main routine
105 errorpatterns="$globalerrorpatterns
106 $myerrorpatterns"
107 ignorepatterns="$globalignorepatterns
108 $myignorepatterns"
109
110 cd $LOGDIR || exit 3
111 if [ -s $errfile ]; then
112 echo "Errorfile already exists. Aborting."
113 exit
114 fi
115
116 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
117
118 if [ -s $errfile ]; then
119 echo "ERRORS found in log files. See $errfile."
120 else
121 echo "Congratulations! No errors found in log files."
122 export flag_reboot=1
123 fi

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5