[Nagiosplug-devel] check_dns.c: Requires DNS server (patch)
Steve Bonds
r1p6os402 at sneakemail.com
Tue Feb 4 18:02:04 CET 2003
I hate it when I do that. ;-)
It's REALLY attached this time.
-- Steve
On Tue, 4 Feb 2003, Subhendu Ghosh sghosh-at-sghosh.org |Nagios| wrote:
>
> attached patch??? ;)
>
> On Tue, 4 Feb 2003, Steve Bonds wrote:
>
> > The attached patch corrects the documentation so that it says the server
> > is required.
-------------- next part --------------
Index: check_dns.c
===================================================================
RCS file: /cvsroot/nagiosplug/nagiosplug/plugins/check_dns.c,v
retrieving revision 1.6
diff -u -r1.6 check_dns.c
--- check_dns.c 13 Jan 2003 12:15:15 -0000 1.6
+++ check_dns.c 5 Feb 2003 00:21:38 -0000
@@ -354,7 +354,7 @@
c = optind;
if (query_address[0] == 0) {
if (is_host (argv[c]) == FALSE) {
- printf ("Invalid name/address: %s\n\n", argv[c]);
+ printf ("Invalid host name/address: %s\n\n", argv[c]);
return ERROR;
}
if (strlen (argv[c]) >= ADDRESS_LENGTH)
@@ -364,7 +364,7 @@
if (dns_server[0] == 0) {
if (is_host (argv[c]) == FALSE) {
- printf ("Invalid name/address: %s\n\n", argv[c]);
+ printf ("Invalid DNS server name/address: %s\n\n", argv[c]);
return ERROR;
}
if (strlen (argv[c]) >= ADDRESS_LENGTH)
@@ -387,7 +387,7 @@
void
print_usage (void)
{
- printf ("Usage: %s -H host [-s server] [-a expected-address] [-t timeout]\n" " %s --help\n"
+ printf ("Usage: %s -H host -s server [-a expected-address] [-t timeout]\n" " %s --help\n"
" %s --version\n", progname, progname, progname);
}
@@ -402,7 +402,7 @@
"-H, --hostname=HOST\n"
" The name or address you want to query\n"
"-s, --server=HOST\n"
- " Optional DNS server you want to use for the lookup\n"
+ " DNS server you want to use for the lookup\n"
"-a, --expected-address=IP-ADDRESS\n"
" Optional IP address you expect the DNS server to return\n"
"-t, --timeout=INTEGER\n"
@@ -413,7 +413,6 @@
" Print version numbers and license information\n"
"\n"
"This plugin uses the nslookup program to obtain the IP address\n"
- "for the given host/domain query. A optional DNS server to use may\n"
- "be specified. If no DNS server is specified, the default server(s)\n"
- "specified in /etc/resolv.conf will be used.\n", DEFAULT_SOCKET_TIMEOUT);
+ "for the given host/domain query from the given server."
+ "\n", DEFAULT_SOCKET_TIMEOUT);
}
More information about the Devel
mailing list