X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=plugins%2Fcheck_dns.c;h=454f813b30c0bda831874013a4fb30322468abd7;hb=c134205981203c7a6908f5ae1e3ca297bac83876;hp=3b94a7abd87f6e8a6e17623c435f5f45c7a3eda6;hpb=63271bf65d7f6da74e832e16217bac5778d21d6b;p=nagiosplug.git diff --git a/plugins/check_dns.c b/plugins/check_dns.c index 3b94a7a..454f813 100644 --- a/plugins/check_dns.c +++ b/plugins/check_dns.c @@ -1,33 +1,48 @@ /****************************************************************************** - - 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. - - LIMITATION: nslookup on Solaris 7 can return output over 2 lines, which will not - be picked up by this plugin - - $Id$ - +* +* Nagios check_dns plugin +* +* License: GPL +* Copyright (c) 1999-2006 nagios-plugins team +* +* Last Modified: $Date$ +* +* Description: +* +* This file contains the check_dns plugin +* +* LIMITATION: nslookup on Solaris 7 can return output over 2 lines, which will not +* be picked up by this plugin +* +* License Information: +* +* 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$ +* ******************************************************************************/ const char *progname = "check_dns"; const char *revision = "$Revision$"; -const char *copyright = "2000-2005"; +const char *copyright = "2000-2006"; const char *email = "nagiosplug-devel@lists.sourceforge.net"; #include "common.h" #include "utils.h" +#include "utils_base.h" #include "netutils.h" #include "runcmd.h" @@ -355,7 +370,7 @@ process_arguments (int argc, char **argv) critical = optarg; break; default: /* args not parsable */ - usage_va(_("Unknown argument - %s"), optarg); + usage5(); } } @@ -398,15 +413,16 @@ print_help (void) printf ("Copyright (c) 1999 Ethan Galstad \n"); printf (COPYRIGHT, copyright, email); - printf (_("This plugin uses the nslookup program to obtain the IP address for the given host/domain query.")); - printf ("\n"); - printf (_("An optional DNS server to use may be specified.")); - printf ("\n"); - printf (_("If no DNS server is specified, the default server(s) specified in /etc/resolv.conf will be used.")); + printf ("%s\n", _("This plugin uses the nslookup program to obtain the IP address for the given host/domain query.")); + printf ("%s\n", _("An optional DNS server to use may be specified.")); + printf ("%s\n", _("If no DNS server is specified, the default server(s) specified in /etc/resolv.conf will be used.")); + printf ("\n\n"); print_usage (); + printf (_(UT_HELP_VRSN)); + printf (" -H, --hostname=HOST\n"); printf (" %s\n", _("The name or address you want to query")); printf (" -s, --server=HOST\n"); @@ -429,6 +445,5 @@ void print_usage (void) { printf (_("Usage:")); - printf ("%s -H host [-s server] [-a expected-address] [-A] [-t timeout] [-w warn] [-c crit]\n", progname); }