diff options
Diffstat (limited to 'web/attachments/153312-nagios-plugins-1.4-check_log.patch')
-rw-r--r-- | web/attachments/153312-nagios-plugins-1.4-check_log.patch | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/web/attachments/153312-nagios-plugins-1.4-check_log.patch b/web/attachments/153312-nagios-plugins-1.4-check_log.patch new file mode 100644 index 0000000..7c8f439 --- /dev/null +++ b/web/attachments/153312-nagios-plugins-1.4-check_log.patch | |||
@@ -0,0 +1,65 @@ | |||
1 | *** nagios-plugins-1.4/plugins-scripts/check_log.sh.orig Thu Feb 3 23:51:35 2005 | ||
2 | --- nagios-plugins-1.4/plugins-scripts/check_log.sh Fri Oct 21 10:34:23 2005 | ||
3 | *************** | ||
4 | *** 61,71 **** | ||
5 | PATH="" | ||
6 | |||
7 | ECHO="/bin/echo" | ||
8 | ! GREP="/bin/grep" | ||
9 | DIFF="/bin/diff" | ||
10 | TAIL="/bin/tail" | ||
11 | CAT="/bin/cat" | ||
12 | RM="/bin/rm" | ||
13 | |||
14 | PROGNAME=`/bin/basename $0` | ||
15 | PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` | ||
16 | --- 61,73 ---- | ||
17 | PATH="" | ||
18 | |||
19 | ECHO="/bin/echo" | ||
20 | ! GREP="/bin/egrep" | ||
21 | DIFF="/bin/diff" | ||
22 | TAIL="/bin/tail" | ||
23 | CAT="/bin/cat" | ||
24 | RM="/bin/rm" | ||
25 | + CHMOD="/bin/chmod" | ||
26 | + TOUCH="/bin/touch" | ||
27 | |||
28 | PROGNAME=`/bin/basename $0` | ||
29 | PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` | ||
30 | *************** | ||
31 | *** 191,198 **** | ||
32 | else | ||
33 | tempdiff=`/bin/date '+%H%M%S'` | ||
34 | tempdiff="/tmp/check_log.${tempdiff}" | ||
35 | ! /bin/touch $tempdiff | ||
36 | ! chmod 600 $tempdiff | ||
37 | fi | ||
38 | |||
39 | $DIFF $logfile $oldlog > $tempdiff | ||
40 | --- 193,200 ---- | ||
41 | else | ||
42 | tempdiff=`/bin/date '+%H%M%S'` | ||
43 | tempdiff="/tmp/check_log.${tempdiff}" | ||
44 | ! $TOUCH $tempdiff | ||
45 | ! $CHMOD 600 $tempdiff | ||
46 | fi | ||
47 | |||
48 | $DIFF $logfile $oldlog > $tempdiff | ||
49 | *************** | ||
50 | *** 201,207 **** | ||
51 | count=`$GREP -c "$query" $tempdiff` | ||
52 | |||
53 | # Get the last matching entry in the diff file | ||
54 | ! lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1` | ||
55 | |||
56 | $RM -f $tempdiff | ||
57 | $CAT $logfile > $oldlog | ||
58 | --- 203,209 ---- | ||
59 | count=`$GREP -c "$query" $tempdiff` | ||
60 | |||
61 | # Get the last matching entry in the diff file | ||
62 | ! lastentry=`$GREP "$query" $tempdiff | $TAIL -1` | ||
63 | |||
64 | $RM -f $tempdiff | ||
65 | $CAT $logfile > $oldlog | ||