ports/184749: [patch] net-mgmt/nagios-plugins: Fix check_dns plugin on OSVERSION >= 1000000

Glen Barber gjb at FreeBSD.org
Fri Dec 13 14:30:00 UTC 2013


>Number:         184749
>Category:       ports
>Synopsis:       [patch] net-mgmt/nagios-plugins: Fix check_dns plugin on OSVERSION >= 1000000
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Fri Dec 13 14:30:00 UTC 2013
>Closed-Date:
>Last-Modified:
>Originator:     Glen Barber
>Release:        FreeBSD 11.0-CURRENT r258761
>Organization:
The FreeBSD Foundation
>Environment:
FreeBSD nucleus 11.0-CURRENT FreeBSD 11.0-CURRENT #194 r258761: Wed Dec  4 09:23:20 EST 2013     root at nucleus:/usr/obj/usr/src/sys/NUCLEUS  amd64
>Description:
check_dns.c hard-codes the path to nslookup(1) to /usr/bin/nslookup, which does not exist by default on head/, stable/10/, or releng/10.0/.

This causes the check_dns plugin to fail, outputting the following:
"DNS CRITICAL - '/usr/bin/nslookup -sil' msg parsing exited with no address"
>How-To-Repeat:

>Fix:
Attached patch resolves the issue.

Patch attached with submission follows:

Index: net-mgmt/nagios-plugins/Makefile
===================================================================
--- net-mgmt/nagios-plugins/Makefile	(revision 336347)
+++ net-mgmt/nagios-plugins/Makefile	(working copy)
@@ -3,6 +3,7 @@
 
 PORTNAME=	nagios-plugins
 PORTVERSION=	1.5
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net-mgmt
 MASTER_SITES=	https://www.nagios-plugins.org/download/
@@ -56,6 +57,10 @@
 		--sysconfdir=${PREFIX}/etc/nagios \
 		--localstatedir=${NAGIOSDIR} \
 		--prefix=${PREFIX}
+.if(${OSVERSION} >= 1000000)
+CONFIGURE_ARGS+=--with-nslookup-command=${PREFIX}/bin/nslookup
+BUILD_DEPENDS+=	nslookup:${PORTSDIR}/dns/bind-tools
+.endif
 
 CONFIGURE_ENV=	PERL=${PERL}
 CPPFLAGS+=	-I${LOCALBASE}/include


>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-ports-bugs mailing list