From 0b6423f9c99d9edf8c96fefd0f6c453859395aa1 Mon Sep 17 00:00:00 2001 From: Holger Weiss Date: Mon, 30 Sep 2013 00:03:24 +0200 Subject: Import Nagios Plugins site Import the Nagios Plugins web site, Cronjobs, infrastructure scripts, and configuration files. --- .../153312-nagios-plugins-1.4-check_log.patch | 65 ++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 web/attachments/153312-nagios-plugins-1.4-check_log.patch (limited to 'web/attachments/153312-nagios-plugins-1.4-check_log.patch') 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 @@ +*** nagios-plugins-1.4/plugins-scripts/check_log.sh.orig Thu Feb 3 23:51:35 2005 +--- nagios-plugins-1.4/plugins-scripts/check_log.sh Fri Oct 21 10:34:23 2005 +*************** +*** 61,71 **** + PATH="" + + ECHO="/bin/echo" +! GREP="/bin/grep" + DIFF="/bin/diff" + TAIL="/bin/tail" + CAT="/bin/cat" + RM="/bin/rm" + + PROGNAME=`/bin/basename $0` + PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` +--- 61,73 ---- + PATH="" + + ECHO="/bin/echo" +! GREP="/bin/egrep" + DIFF="/bin/diff" + TAIL="/bin/tail" + CAT="/bin/cat" + RM="/bin/rm" ++ CHMOD="/bin/chmod" ++ TOUCH="/bin/touch" + + PROGNAME=`/bin/basename $0` + PROGPATH=`echo $0 | /bin/sed -e 's,[\\/][^\\/][^\\/]*$,,'` +*************** +*** 191,198 **** + else + tempdiff=`/bin/date '+%H%M%S'` + tempdiff="/tmp/check_log.${tempdiff}" +! /bin/touch $tempdiff +! chmod 600 $tempdiff + fi + + $DIFF $logfile $oldlog > $tempdiff +--- 193,200 ---- + else + tempdiff=`/bin/date '+%H%M%S'` + tempdiff="/tmp/check_log.${tempdiff}" +! $TOUCH $tempdiff +! $CHMOD 600 $tempdiff + fi + + $DIFF $logfile $oldlog > $tempdiff +*************** +*** 201,207 **** + count=`$GREP -c "$query" $tempdiff` + + # Get the last matching entry in the diff file +! lastentry=`$GREP "$query" $tempdiff | $TAIL --lines=1` + + $RM -f $tempdiff + $CAT $logfile > $oldlog +--- 203,209 ---- + count=`$GREP -c "$query" $tempdiff` + + # Get the last matching entry in the diff file +! lastentry=`$GREP "$query" $tempdiff | $TAIL -1` + + $RM -f $tempdiff + $CAT $logfile > $oldlog -- cgit v1.2.3-74-g34f1