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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1906 - (show annotations) (download)
Tue Jul 15 09:27:22 2003 UTC (9 years, 10 months ago) by lange
File size: 2376 byte(s)
moved simple examples to new dir
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 cannot create"
33
34 globalignorepatterns="[a-z]\+\.log:#
35 ^fstab.\+errors=remount
36 [RT]X packets:
37 warned about = ( )
38 daemon.warn
39 kern.warn
40 rw,errors=
41 Expect some cache
42 no error
43 failmsg
44 RPC call returned error 101
45 deverror.out
46 (floppy), sector 0
47 mount version older than kernel
48 Can't locate module
49 Warning only 896MB will be used.
50 hostname: Host name lookup failure
51 I can't tell the difference.
52 warning, not much extra random data, consider using the -rand option
53 confC._FILE
54 Warning: 3 database(s) sources
55 were not found, (but were created)
56 removing exim
57 The home dir you specified already exists.
58 No Rule for /usr/lib/ispell/default.hash.
59 /usr/sbin/update-fonts-.\+: warning: absolute path
60 hostname: Unknown server error
61 EXT2-fs warning: checktime reached
62 RPC: sendmsg returned error 101
63 can't print them to stdout. Define these classes
64 warning: downgrading
65 suppress emacs errors
66 echo Error:
67 Can't open dependencies file
68 documents in /usr/doc are no longer supported
69 if you have both a SCSI and an IDE CD-ROM
70 not updating .\+ font directory data."
71 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
72 # Here you can define your own patterns. Put one pattern in a line,
73 # do not create empty lines.
74 myerrorpatterns="XXXXX"
75 myignorepatterns="XXXXX"
76 # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
77 # The main routine
78 errorpatterns="$globalerrorpatterns
79 $myerrorpatterns"
80 ignorepatterns="$globalignorepatterns
81 $myignorepatterns"
82
83 cd $LOGDIR || exit 3
84 if [ -s $errfile ]; then
85 echo "Errorfile already exists. Aborting."
86 exit
87 fi
88
89 grep -i "$errorpatterns" *.log | grep -vi "$ignorepatterns" > $errfile
90
91 if [ -s $errfile ]; then
92 echo "ERRORS found in log files. See $errfile."
93 else
94 echo "Congratulations! No errors found in log files."
95 fi

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5