--- 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\