X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_ups.c;h=a4d765038882a9493767af05a96113ec8ff7b0fb;hb=3438df79d1fbf7d929467855ffe7b9f1c181c09e;hp=4006031f183f3ddd98f94da01935f5527a50bef6;hpb=df1bd0c89ff63de64ee630e0025389651947020c;p=nagiosplug.git diff --git a/plugins/check_ups.c b/plugins/check_ups.c index 4006031..a4d7650 100644 --- a/plugins/check_ups.c +++ b/plugins/check_ups.c @@ -29,10 +29,9 @@ const char *progname = "check_ups"; const char *revision = "$Revision$"; -const char *copyright = "2000-2002"; +const char *copyright = "2000-2004"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; -#include #include "common.h" #include "netutils.h" #include "utils.h" @@ -96,7 +95,7 @@ void print_usage (void); int main (int argc, char **argv) { - int result = STATE_OK; + int result = STATE_UNKNOWN; char *message; char *data; char temp_buffer[MAX_INPUT_BUFFER]; @@ -111,8 +110,8 @@ main (int argc, char **argv) data = strdup (""); message = strdup (""); - if (process_arguments (argc, argv) != TRUE) - usage (_("check_ups: could not parse arguments\n")); + if (process_arguments (argc, argv) == ERROR) + usage4 (_("Could not parse arguments")); /* initialize alarm signal handling */ signal (SIGALRM, socket_timeout_alarm_handler); @@ -593,7 +592,6 @@ print_help (void) printf ("Copyright (c) 2000 Tom Shields"); printf ("Copyright (c) 2004 Alain Richard \n"); printf ("Copyright (c) 2004 Arnaud Quette \n"); - printf (COPYRIGHT, copyright, email); printf (_("This plugin tests the UPS service on the specified host.\n\ @@ -647,8 +645,7 @@ http://www.networkupstools.org\n\n")); void print_usage (void) { - printf (_("\ + printf ("\ Usage: %s -H host -u ups [-p port] [-v variable]\n\ - [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n"), progname); - printf (_(UT_HLP_VRS), progname, progname); + [-wv warn_value] [-cv crit_value] [-to to_sec] [-T]\n", progname); }