Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 13 Apr 2017 10:17:09 +0000 (UTC)
From:      Mathieu Arnold <mat@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-branches@freebsd.org
Subject:   svn commit: r438436 - in branches/2017Q2/dns: bind9-devel bind9-devel/files bind910 bind910/files bind911 bind911/files bind99 bind99/files
Message-ID:  <201704131017.v3DAH9un065295@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mat
Date: Thu Apr 13 10:17:08 2017
New Revision: 438436
URL: https://svnweb.freebsd.org/changeset/ports/438436

Log:
  MFH: r438434
  
  Unbreak rndc calls when using non default rndc.key location.
  
  PR:		218335
  Sponsored by:	Absolight

Modified:
  branches/2017Q2/dns/bind9-devel/Makefile
  branches/2017Q2/dns/bind9-devel/files/named.in
  branches/2017Q2/dns/bind910/Makefile
  branches/2017Q2/dns/bind910/files/named.in
  branches/2017Q2/dns/bind911/Makefile
  branches/2017Q2/dns/bind911/files/named.in
  branches/2017Q2/dns/bind99/Makefile
  branches/2017Q2/dns/bind99/files/named.in
Directory Properties:
  branches/2017Q2/   (props changed)

Modified: branches/2017Q2/dns/bind9-devel/Makefile
==============================================================================
--- branches/2017Q2/dns/bind9-devel/Makefile	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind9-devel/Makefile	Thu Apr 13 10:17:08 2017	(r438436)
@@ -8,7 +8,7 @@ PORTVERSION=	${ISCVERSION:S/-P/P/:S/b/.b
 PORTREVISION=	0
 .else
 # dns/bind9xx here
-PORTREVISION=	0
+PORTREVISION=	1
 .endif
 CATEGORIES=	dns net ipv6
 MASTER_SITES=	LOCAL/mat/bind

Modified: branches/2017Q2/dns/bind9-devel/files/named.in
==============================================================================
--- branches/2017Q2/dns/bind9-devel/files/named.in	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind9-devel/files/named.in	Thu Apr 13 10:17:08 2017	(r438436)
@@ -194,7 +194,7 @@ named_reload()
 {
 	# This is a one line function, but ${named_program} is not defined early
 	# enough to be there when the reload_cmd variable is defined up there.
-	${_named_program_root}/sbin/rndc ${rndc_flags} reload
+	rndc reload
 }
 
 find_pidfile()
@@ -220,7 +220,7 @@ named_stop()
 		return 1
 	fi
 	echo 'Stopping named.'
-	if ${_named_program_root}/sbin/rndc ${rndc_flags} stop 2>/dev/null; then
+	if rndc stop; then
 		wait_for_pids ${rc_pid}
 	else
 		echo -n 'rndc failed, trying kill: '
@@ -255,6 +255,21 @@ create_file()
 	install -o root -g wheel -m 0644 /dev/null $1
 }
 
+rndc()
+{
+	if [ -z "${rndc_flags}" ]; then
+		if [ -s "${rndc_conf}" ] ; then
+			rndc_flags="-c ${rndc_conf}"
+		elif [ -s "${rndc_key}" ] ; then
+			rndc_flags="-k ${rndc_key}"
+		else
+			rndc_flags=""
+		fi
+	fi
+
+	${_named_program_root}/sbin/rndc ${rndc_flags} "$@"
+}
+
 named_prestart()
 {
 	find_pidfile
@@ -270,16 +285,6 @@ named_prestart()
 
 	command_args="-u ${named_uid:=root} -c ${named_conf} ${command_args}"
 
-	if [ -z "${rndc_flags}" ]; then
-		if [ -s ${rndc_conf} ] ; then
-			rndc_flags="-c ${rndc_conf}"
-		elif [ -s ${rndc_key} ] ; then
-			rndc_flags="-k ${rndc_key}"
-		else
-			rndc_flags=""
-		fi
-	fi
-
 %%NATIVE_PKCS11%%	if [ -z "${named_pkcs11_engine}"]; then
 %%NATIVE_PKCS11%%		err 3 "named_pkcs11_engine has to be set to the PKCS#11 engine's library you want to use"
 %%NATIVE_PKCS11%%	elif [ ! -f ${named_pkcs11_engine} ]; then

Modified: branches/2017Q2/dns/bind910/Makefile
==============================================================================
--- branches/2017Q2/dns/bind910/Makefile	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind910/Makefile	Thu Apr 13 10:17:08 2017	(r438436)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bind
 PORTVERSION=	${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	dns net ipv6
 MASTER_SITES=	ISC/bind9/${ISCVERSION}
 PKGNAMESUFFIX=	910

Modified: branches/2017Q2/dns/bind910/files/named.in
==============================================================================
--- branches/2017Q2/dns/bind910/files/named.in	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind910/files/named.in	Thu Apr 13 10:17:08 2017	(r438436)
@@ -194,7 +194,7 @@ named_reload()
 {
 	# This is a one line function, but ${named_program} is not defined early
 	# enough to be there when the reload_cmd variable is defined up there.
-	${_named_program_root}/sbin/rndc ${rndc_flags} reload
+	rndc reload
 }
 
 find_pidfile()
@@ -220,7 +220,7 @@ named_stop()
 		return 1
 	fi
 	echo 'Stopping named.'
-	if ${_named_program_root}/sbin/rndc ${rndc_flags} stop 2>/dev/null; then
+	if rndc stop; then
 		wait_for_pids ${rc_pid}
 	else
 		echo -n 'rndc failed, trying kill: '
@@ -255,6 +255,21 @@ create_file()
 	install -o root -g wheel -m 0644 /dev/null $1
 }
 
+rndc()
+{
+	if [ -z "${rndc_flags}" ]; then
+		if [ -s "${rndc_conf}" ] ; then
+			rndc_flags="-c ${rndc_conf}"
+		elif [ -s "${rndc_key}" ] ; then
+			rndc_flags="-k ${rndc_key}"
+		else
+			rndc_flags=""
+		fi
+	fi
+
+	${_named_program_root}/sbin/rndc ${rndc_flags} "$@"
+}
+
 named_prestart()
 {
 	find_pidfile
@@ -270,16 +285,6 @@ named_prestart()
 
 	command_args="-u ${named_uid:=root} -c ${named_conf} ${command_args}"
 
-	if [ -z "${rndc_flags}" ]; then
-		if [ -s ${rndc_conf} ] ; then
-			rndc_flags="-c ${rndc_conf}"
-		elif [ -s ${rndc_key} ] ; then
-			rndc_flags="-k ${rndc_key}"
-		else
-			rndc_flags=""
-		fi
-	fi
-
 %%NATIVE_PKCS11%%	if [ -z "${named_pkcs11_engine}"]; then
 %%NATIVE_PKCS11%%		err 3 "named_pkcs11_engine has to be set to the PKCS#11 engine's library you want to use"
 %%NATIVE_PKCS11%%	elif [ ! -f ${named_pkcs11_engine} ]; then

Modified: branches/2017Q2/dns/bind911/Makefile
==============================================================================
--- branches/2017Q2/dns/bind911/Makefile	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind911/Makefile	Thu Apr 13 10:17:08 2017	(r438436)
@@ -8,7 +8,7 @@ PORTVERSION=	${ISCVERSION:S/-P/P/:S/b/.b
 PORTREVISION=	0
 .else
 # dns/bind9xx here
-PORTREVISION=	0
+PORTREVISION=	1
 .endif
 CATEGORIES=	dns net ipv6
 MASTER_SITES=	ISC/bind9/${ISCVERSION}

Modified: branches/2017Q2/dns/bind911/files/named.in
==============================================================================
--- branches/2017Q2/dns/bind911/files/named.in	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind911/files/named.in	Thu Apr 13 10:17:08 2017	(r438436)
@@ -194,7 +194,7 @@ named_reload()
 {
 	# This is a one line function, but ${named_program} is not defined early
 	# enough to be there when the reload_cmd variable is defined up there.
-	${_named_program_root}/sbin/rndc ${rndc_flags} reload
+	rndc reload
 }
 
 find_pidfile()
@@ -220,7 +220,7 @@ named_stop()
 		return 1
 	fi
 	echo 'Stopping named.'
-	if ${_named_program_root}/sbin/rndc ${rndc_flags} stop 2>/dev/null; then
+	if rndc stop; then
 		wait_for_pids ${rc_pid}
 	else
 		echo -n 'rndc failed, trying kill: '
@@ -255,6 +255,21 @@ create_file()
 	install -o root -g wheel -m 0644 /dev/null $1
 }
 
+rndc()
+{
+	if [ -z "${rndc_flags}" ]; then
+		if [ -s "${rndc_conf}" ] ; then
+			rndc_flags="-c ${rndc_conf}"
+		elif [ -s "${rndc_key}" ] ; then
+			rndc_flags="-k ${rndc_key}"
+		else
+			rndc_flags=""
+		fi
+	fi
+
+	${_named_program_root}/sbin/rndc ${rndc_flags} "$@"
+}
+
 named_prestart()
 {
 	find_pidfile
@@ -270,16 +285,6 @@ named_prestart()
 
 	command_args="-u ${named_uid:=root} -c ${named_conf} ${command_args}"
 
-	if [ -z "${rndc_flags}" ]; then
-		if [ -s ${rndc_conf} ] ; then
-			rndc_flags="-c ${rndc_conf}"
-		elif [ -s ${rndc_key} ] ; then
-			rndc_flags="-k ${rndc_key}"
-		else
-			rndc_flags=""
-		fi
-	fi
-
 %%NATIVE_PKCS11%%	if [ -z "${named_pkcs11_engine}"]; then
 %%NATIVE_PKCS11%%		err 3 "named_pkcs11_engine has to be set to the PKCS#11 engine's library you want to use"
 %%NATIVE_PKCS11%%	elif [ ! -f ${named_pkcs11_engine} ]; then

Modified: branches/2017Q2/dns/bind99/Makefile
==============================================================================
--- branches/2017Q2/dns/bind99/Makefile	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind99/Makefile	Thu Apr 13 10:17:08 2017	(r438436)
@@ -3,7 +3,7 @@
 
 PORTNAME=	bind
 PORTVERSION=	${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
-PORTREVISION=	0
+PORTREVISION=	1
 CATEGORIES=	dns net ipv6
 MASTER_SITES=	ISC/bind9/${ISCVERSION}
 PKGNAMESUFFIX=	99

Modified: branches/2017Q2/dns/bind99/files/named.in
==============================================================================
--- branches/2017Q2/dns/bind99/files/named.in	Thu Apr 13 10:16:37 2017	(r438435)
+++ branches/2017Q2/dns/bind99/files/named.in	Thu Apr 13 10:17:08 2017	(r438436)
@@ -192,7 +192,7 @@ named_reload()
 {
 	# This is a one line function, but ${named_program} is not defined early
 	# enough to be there when the reload_cmd variable is defined up there.
-	${_named_program_root}/sbin/rndc ${rndc_flags} reload
+	rndc reload
 }
 
 find_pidfile()
@@ -218,7 +218,7 @@ named_stop()
 		return 1
 	fi
 	echo 'Stopping named.'
-	if ${_named_program_root}/sbin/rndc ${rndc_flags} stop 2>/dev/null; then
+	if rndc stop; then
 		wait_for_pids ${rc_pid}
 	else
 		echo -n 'rndc failed, trying kill: '
@@ -253,6 +253,21 @@ create_file()
 	install -o root -g wheel -m 0644 /dev/null $1
 }
 
+rndc()
+{
+	if [ -z "${rndc_flags}" ]; then
+		if [ -s "${rndc_conf}" ] ; then
+			rndc_flags="-c ${rndc_conf}"
+		elif [ -s "${rndc_key}" ] ; then
+			rndc_flags="-k ${rndc_key}"
+		else
+			rndc_flags=""
+		fi
+	fi
+
+	${_named_program_root}/sbin/rndc ${rndc_flags} "$@"
+}
+
 named_prestart()
 {
 	find_pidfile
@@ -268,16 +283,6 @@ named_prestart()
 
 	command_args="-u ${named_uid:=root} -c ${named_conf} ${command_args}"
 
-	if [ -z "${rndc_flags}" ]; then
-		if [ -s ${rndc_conf} ] ; then
-			rndc_flags="-c ${rndc_conf}"
-		elif [ -s ${rndc_key} ] ; then
-			rndc_flags="-k ${rndc_key}"
-		else
-			rndc_flags=""
-		fi
-	fi
-
 	local line nsip firstns
 
 	# Is the user using a sandbox?



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201704131017.v3DAH9un065295>