[Pkg-nagios-devel] nagios-plugins/debian/patches 00list, 1.3,
1.4 11_check_ups.c_perfdata_fix.dpatch, NONE, 1.1
seanius at haydn.debian.org
seanius at haydn.debian.org
Thu Oct 6 12:48:40 UTC 2005
Update of /cvsroot/pkg-nagios/nagios-plugins/debian/patches
In directory haydn:/org/alioth.debian.org/chroot/home/users/seanius/tmp/cvs-serv23512/debian/patches
Modified Files:
00list
Added Files:
11_check_ups.c_perfdata_fix.dpatch
Log Message:
- include upstream fix for check_ups temperature perfdata. thanks
to Chris AtLee for originally reporting this (closes: #316534).
Index: 00list
===================================================================
RCS file: /cvsroot/pkg-nagios/nagios-plugins/debian/patches/00list,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- 00list 6 Oct 2005 09:19:36 -0000 1.3
+++ 00list 6 Oct 2005 12:48:37 -0000 1.4
@@ -1,3 +1,4 @@
02_utilspm
06_checkircd
10_config.h_debiandefaults.dpatch
+11_check_ups.c_perfdata_fix.dpatch
--- NEW FILE: 11_check_ups.c_perfdata_fix.dpatch ---
#! /bin/sh /usr/share/dpatch/dpatch-run
## 11_check_ups.c_perfdata_fix.dpatch by <seanius at localhost.localdomain>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: No description.
@DPATCH@
diff -urNad sid~/plugins/check_ups.c sid/plugins/check_ups.c
--- sid~/plugins/check_ups.c 2005-03-04 22:58:40.000000000 +0100
+++ sid/plugins/check_ups.c 2005-10-06 14:43:10.000000000 +0200
@@ -23,12 +23,12 @@
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- $Id: 11_check_ups.c_perfdata_fix.dpatch,v 1.1 2005/10/06 12:48:37 seanius Exp $
+ $Id: 11_check_ups.c_perfdata_fix.dpatch,v 1.1 2005/10/06 12:48:37 seanius Exp $
******************************************************************************/
const char *progname = "check_ups";
-const char *revision = "$Revision: 1.1 $";
+const char *revision = "$Revision: 1.1 $";
const char *copyright = "2000-2004";
const char *email = "nagiosplug-devel at lists.sourceforge.net";
@@ -98,6 +98,7 @@
int result = STATE_UNKNOWN;
char *message;
char *data;
+ char *tunits;
char temp_buffer[MAX_INPUT_BUFFER];
double ups_utility_deviation = 0.0;
int res;
@@ -281,10 +282,12 @@
else {
supported_options |= UPS_TEMP;
if (temp_output_c) {
+ tunits="degC";
ups_temperature = atof (temp_buffer);
asprintf (&message, "%sTemp=%3.1fC", message, ups_temperature);
}
else {
+ tunits="degF";
ups_temperature = (atof (temp_buffer) * 1.8) + 32;
asprintf (&message, "%sTemp=%3.1fF", message, ups_temperature);
}
@@ -297,13 +300,13 @@
result = max_state (result, STATE_WARNING);
}
asprintf (&data, "%s %s", data,
- perfdata ("temp", (long)ups_temperature, "degF",
+ perfdata ("temp", (long)ups_temperature, tunits,
check_warn, (long)(1000*warning_value),
check_crit, (long)(1000*critical_value),
TRUE, 0, FALSE, 0));
} else {
asprintf (&data, "%s %s", data,
- perfdata ("temp", (long)ups_temperature, "degF",
+ perfdata ("temp", (long)ups_temperature, tunits,
FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0));
}
}
More information about the Pkg-nagios-devel
mailing list