From owner-svn-ports-head@freebsd.org Thu Apr 13 10:15:20 2017 Return-Path: Delivered-To: svn-ports-head@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 C4958D3CE66; Thu, 13 Apr 2017 10:15:20 +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 9FFB9F10; Thu, 13 Apr 2017 10:15:20 +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 v3DAFJFH064836; Thu, 13 Apr 2017 10:15:19 GMT (envelope-from mat@FreeBSD.org) Received: (from mat@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id v3DAFJTa064827; Thu, 13 Apr 2017 10:15:19 GMT (envelope-from mat@FreeBSD.org) Message-Id: <201704131015.v3DAFJTa064827@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:15:19 +0000 (UTC) To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r438434 - in head/dns: bind9-devel bind9-devel/files bind910 bind910/files bind911 bind911/files bind99 bind99/files X-SVN-Group: ports-head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-ports-head@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: SVN commit messages for the ports tree for head List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 13 Apr 2017 10:15:20 -0000 Author: mat Date: Thu Apr 13 10:15:18 2017 New Revision: 438434 URL: https://svnweb.freebsd.org/changeset/ports/438434 Log: Unbreak rndc calls when using non default rndc.key location. PR: 218335 Sponsored by: Absolight Modified: head/dns/bind9-devel/Makefile (contents, props changed) head/dns/bind9-devel/files/named.in head/dns/bind910/Makefile (contents, props changed) head/dns/bind910/files/named.in head/dns/bind911/Makefile (contents, props changed) head/dns/bind911/files/named.in head/dns/bind99/Makefile (contents, props changed) head/dns/bind99/files/named.in Modified: head/dns/bind9-devel/Makefile ============================================================================== --- head/dns/bind9-devel/Makefile Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind9-devel/Makefile Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind9-devel/files/named.in ============================================================================== --- head/dns/bind9-devel/files/named.in Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind9-devel/files/named.in Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind910/Makefile ============================================================================== --- head/dns/bind910/Makefile Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind910/Makefile Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind910/files/named.in ============================================================================== --- head/dns/bind910/files/named.in Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind910/files/named.in Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind911/Makefile ============================================================================== --- head/dns/bind911/Makefile Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind911/Makefile Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind911/files/named.in ============================================================================== --- head/dns/bind911/files/named.in Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind911/files/named.in Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind99/Makefile ============================================================================== --- head/dns/bind99/Makefile Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind99/Makefile Thu Apr 13 10:15:18 2017 (r438434) @@ -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: head/dns/bind99/files/named.in ============================================================================== --- head/dns/bind99/files/named.in Thu Apr 13 10:15:14 2017 (r438433) +++ head/dns/bind99/files/named.in Thu Apr 13 10:15:18 2017 (r438434) @@ -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?