fix check_dig
This commit is contained in:
parent
b107590420
commit
fa8f9047f4
2
debian/changelog
vendored
2
debian/changelog
vendored
|
@ -49,6 +49,8 @@ nagios-plugins (1.4.12-1) UNRELEASED; urgency=low
|
||||||
* add check_linux_raid into package (Closes: #461999) and add
|
* add check_linux_raid into package (Closes: #461999) and add
|
||||||
38_fix_libexec.dpatch to fix libexec path
|
38_fix_libexec.dpatch to fix libexec path
|
||||||
* Updating standards version to 3.8.0, no changes needed
|
* Updating standards version to 3.8.0, no changes needed
|
||||||
|
* add 39_check_dig_options.dpatch which provides fix for no check for
|
||||||
|
mandatory parameter -l (Closes: #479013)
|
||||||
|
|
||||||
[ Alexander Wirt ]
|
[ Alexander Wirt ]
|
||||||
* Call smbclient with -N (supress password prompt) if no password is
|
* Call smbclient with -N (supress password prompt) if no password is
|
||||||
|
|
1
debian/patches/00list
vendored
1
debian/patches/00list
vendored
|
@ -13,4 +13,5 @@
|
||||||
36_check_ldap_empty_base.dpatch
|
36_check_ldap_empty_base.dpatch
|
||||||
37_check_radius_nas-ip-address.dpatch
|
37_check_radius_nas-ip-address.dpatch
|
||||||
38_fix_libexec.dpatch
|
38_fix_libexec.dpatch
|
||||||
|
39_check_dig_options.dpatch
|
||||||
50_misc_typos.dpatch
|
50_misc_typos.dpatch
|
||||||
|
|
43
debian/patches/39_check_dig_options.dpatch
vendored
Executable file
43
debian/patches/39_check_dig_options.dpatch
vendored
Executable file
|
@ -0,0 +1,43 @@
|
||||||
|
#! /bin/sh /usr/share/dpatch/dpatch-run
|
||||||
|
## 39_check_dig_options.dpatch by Jan Wagner <waja@cyconet.org>
|
||||||
|
## patch provided by Matthias Eble <psychotrahe at users.sourceforge.net>
|
||||||
|
##
|
||||||
|
## DP: Add testcases for check_dig check_dig's -l option is mandatory
|
||||||
|
|
||||||
|
@DPATCH@
|
||||||
|
diff -urNad nagios-plugins-1.4.12~/plugins/check_dig.c nagios-plugins-1.4.12/plugins/check_dig.c
|
||||||
|
--- nagios-plugins-1.4.12~/plugins/check_dig.c 2008-05-07 12:02:42.000000000 +0200
|
||||||
|
+++ nagios-plugins-1.4.12/plugins/check_dig.c 2008-06-09 22:31:59.000000000 +0200
|
||||||
|
@@ -143,8 +143,10 @@
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- if (result == STATE_UNKNOWN)
|
||||||
|
+ if (result == STATE_UNKNOWN) {
|
||||||
|
msg = (char *)_("No ANSWER SECTION found");
|
||||||
|
+ result = STATE_CRITICAL;
|
||||||
|
+ }
|
||||||
|
|
||||||
|
/* If we get anything on STDERR, at least set warning */
|
||||||
|
if(chld_err.buflen > 0) {
|
||||||
|
@@ -295,7 +297,10 @@
|
||||||
|
int
|
||||||
|
validate_arguments (void)
|
||||||
|
{
|
||||||
|
- return OK;
|
||||||
|
+ if (query_address != NULL)
|
||||||
|
+ return OK;
|
||||||
|
+ else
|
||||||
|
+ return ERROR;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@@ -357,7 +362,7 @@
|
||||||
|
print_usage (void)
|
||||||
|
{
|
||||||
|
printf (_("Usage:"));
|
||||||
|
- printf ("%s -H <host> -l <query_address> [-p <server port>]\n", progname);
|
||||||
|
+ printf ("%s -l <query_address> [-H <host>] [-p <server port>]\n", progname);
|
||||||
|
printf (" [-T <query type>] [-w <warning interval>] [-c <critical interval>]\n");
|
||||||
|
printf (" [-t <timeout>] [-a <expected answer address>] [-v]\n");
|
||||||
|
}
|
Loading…
Reference in a new issue