[Pkg-nagios-changes] [pkg-nagios] r1925 - nagios-plugins/trunk/debian/patches

Jan Wagner waja at alioth.debian.org
Wed May 18 14:31:13 UTC 2011


Author: waja
Date: 2011-05-18 14:31:08 +0000 (Wed, 18 May 2011)
New Revision: 1925

Added:
   nagios-plugins/trunk/debian/patches/15_check_sensors_fault.dpatch
Log:
draft fixing #615133

Added: nagios-plugins/trunk/debian/patches/15_check_sensors_fault.dpatch
===================================================================
--- nagios-plugins/trunk/debian/patches/15_check_sensors_fault.dpatch	                        (rev 0)
+++ nagios-plugins/trunk/debian/patches/15_check_sensors_fault.dpatch	2011-05-18 14:31:08 UTC (rev 1925)
@@ -0,0 +1,32 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 15_check_sensors_fault.dpatch by Jan Wagner <waja at cyconet.org>
+##
+## DP: Report UNKNOWN if sensor is faulty (fixing #615133)
+
+ at DPATCH@
+diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh
+--- nagios-plugins-1.4.15~/plugins-scripts/check_sensors.sh	2010-07-27 22:47:16.000000000 +0200
++++ nagios-plugins-1.4.15/plugins-scripts/check_sensors.sh	2011-05-17 22:17:38.000000000 +0200
+@@ -10,7 +10,7 @@
+ 
+ 
+ print_usage() {
+-	echo "Usage: $PROGNAME"
++	echo "Usage: $PROGNAME [--ignore-fault]"
+ }
+ 
+ print_help() {
+@@ -57,6 +57,13 @@
+ 		if echo ${sensordata} | egrep ALARM > /dev/null; then
+ 			echo SENSOR CRITICAL - Sensor alarm detected!
+ 			exit 2
++		elif echo ${sensordata} | egrep FAULT > /dev/null; then
++			echo SENSOR UNKNOWN - Sensor reported fault
++			if test "$1" != "-i" -a "$1" != "--ignore-fault"; then
++				exit 3
++			else
++				exit 0
++			fi
+ 		else
+ 			echo sensor ok
+ 			exit 0


Property changes on: nagios-plugins/trunk/debian/patches/15_check_sensors_fault.dpatch
___________________________________________________________________
Added: svn:executable
   + *




More information about the Pkg-nagios-changes mailing list