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

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.5