X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_dummy.c;h=3cfc9ede43c4f1360bec587b268470ebeab99ea8;hb=6b6051606175d870bb45bbe67866c1643d4d964a;hp=0a7f472cb8c2c834c85e85f1a359ed4d9f4f2261;hpb=c68d99cee2d1b3de6a7e800440433a39a7436313;p=nagiosplug.git diff --git a/plugins/check_dummy.c b/plugins/check_dummy.c index 0a7f472..3cfc9ed 100644 --- a/plugins/check_dummy.c +++ b/plugins/check_dummy.c @@ -1,26 +1,35 @@ -/****************************************************************************** - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - - $Id$ - -******************************************************************************/ +/***************************************************************************** +* +* Nagios check_dummy plugin +* +* License: GPL +* Copyright (c) 1999-2007 Nagios Plugins Development Team +* +* Description: +* +* This file contains the check_dummy plugin +* +* This plugin will simply return the state corresponding to the numeric value +* +* +* This program is free software: you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation, either version 3 of the License, or +* (at your option) any later version. +* +* This program is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* You should have received a copy of the GNU General Public License +* along with this program. If not, see . +* +* +*****************************************************************************/ const char *progname = "check_dummy"; -const char *revision = "$Revision$"; -const char *copyright = "1999-2005"; +const char *copyright = "1999-2007"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "common.h" @@ -42,7 +51,7 @@ main (int argc, char **argv) if (argc < 2) usage4 (_("Could not parse arguments")); else if (strcmp (argv[1], "-V") == 0 || strcmp (argv[1], "--version") == 0) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); exit (STATE_OK); } else if (strcmp (argv[1], "-h") == 0 || strcmp (argv[1], "--help") == 0) { @@ -68,11 +77,13 @@ main (int argc, char **argv) printf (_("UNKNOWN")); break; default: + printf (_("UNKNOWN")); + printf (": "); printf (_("Status %d is not a supported error state\n"), result); - break; + return STATE_UNKNOWN; } - if (argc >= 3) + if (argc >= 3) printf (": %s", argv[2]); printf("\n"); @@ -85,24 +96,22 @@ main (int argc, char **argv) void print_help (void) { - print_revision (progname, revision); + print_revision (progname, NP_VERSION); printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); - printf (_("This plugin will simply return the state corresponding to the numeric value")); - - printf ("\n"); - - printf (_("of the argument with optional text")); + printf ("%s\n", _("This plugin will simply return the state corresponding to the numeric value")); + + printf ("%s\n", _("of the argument with optional text")); printf ("\n\n"); - + print_usage (); - printf (_(UT_HELP_VRSN)); + printf (UT_HELP_VRSN); - printf (_(UT_SUPPORT)); + printf (UT_SUPPORT); } @@ -110,6 +119,6 @@ print_help (void) void print_usage (void) { - printf (_("Usage:")); + printf ("%s\n", _("Usage:")); printf (" %s [optional text]\n", progname); }