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. --- web/attachments/160015-check_ups--1.28.diff | 55 +++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 web/attachments/160015-check_ups--1.28.diff (limited to 'web/attachments/160015-check_ups--1.28.diff') diff --git a/web/attachments/160015-check_ups--1.28.diff b/web/attachments/160015-check_ups--1.28.diff new file mode 100644 index 0000000..b86f9bb --- /dev/null +++ b/web/attachments/160015-check_ups--1.28.diff @@ -0,0 +1,55 @@ +--- check_ups.c.orig 2005-12-15 17:17:54.000000000 -0500 ++++ check_ups.c 2005-12-15 17:22:44.000000000 -0500 +@@ -7,6 +7,7 @@ + Copyright (c) 2000 Tom Shields + 2004 Alain Richard + 2004 Arnaud Quette ++ 2005 Garrett Honeycutt + + + This program is free software; you can redistribute it and/or modify +@@ -23,13 +24,11 @@ + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +- $Id: check_ups.c,v 1.27 2005/03/04 21:58:40 tonvoon Exp $ +- + ******************************************************************************/ + + const char *progname = "check_ups"; +-const char *revision = "$Revision: 1.27 $"; +-const char *copyright = "2000-2004"; ++const char *revision = "$Revision: 1.28 $"; ++const char *copyright = "2000-2005"; + const char *email = "nagiosplug-devel@lists.sourceforge.net"; + + #include "common.h" +@@ -302,9 +301,17 @@ + check_crit, (long)(1000*critical_value), + TRUE, 0, FALSE, 0)); + } else { +- asprintf (&data, "%s %s", data, +- perfdata ("temp", (long)ups_temperature, "degF", +- FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); ++ /* 2005 garrett honeycutt - small bugfix to print the correct abbreviation */ ++ if (temp_output_c) { ++ asprintf (&data, "%s %s", data, ++ perfdata ("temp", (long)ups_temperature, "degC", ++ FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); ++ } ++ else { ++ asprintf (&data, "%s %s", data, ++ perfdata ("temp", (long)ups_temperature, "degF", ++ FALSE, 0, FALSE, 0, TRUE, 0, FALSE, 0)); ++ } + } + } + +@@ -588,6 +595,7 @@ + printf ("Copyright (c) 2000 Tom Shields"); + printf ("Copyright (c) 2004 Alain Richard \n"); + printf ("Copyright (c) 2004 Arnaud Quette \n"); ++ printf ("Copyright (c) 2005 Garrett Honeycutt \n"); + printf (COPYRIGHT, copyright, email); + + printf (_("This plugin tests the UPS service on the specified host.\n\ -- cgit v1.2.3-74-g34f1