From owner-svn-ports-branches@freebsd.org Thu Apr 13 10:17:10 2017 Return-Path: Delivered-To: svn-ports-branches@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D884FD3CEFF; Thu, 13 Apr 2017 10:17:10 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B3BE231A; Thu, 13 Apr 2017 10:17:10 +0000 (UTC) (envelope-from mat@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id v3DAH99p065304; Thu, 13 Apr 2017 10:17:09 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DAH9un065295; Thu, 13 Apr 2017 10:17:09 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201704131017.v3DAH9un065295@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: mat set sender to mat@FreeBSD.org using -f From: Mathieu Arnold Date: Thu, 13 Apr 2017 10:17:09 +0000 (UTC) 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 X-SVN-Group: ports-branches MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-branches@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for all the branches of the ports tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 10:17:11 -0000 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?