diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2017-04-13 10:15:18 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2017-04-13 10:15:18 +0000 |
commit | 0688061ed171c8ecdad7fbbf15db4c790b4234fa (patch) | |
tree | d181b0c52a73f4dbf8174566cc2daeae6cd77c8d /dns/bind911 | |
parent | e962d6f96d0cf721fdc6d74deedd184acf714926 (diff) | |
download | ports-0688061ed171c8ecdad7fbbf15db4c790b4234fa.tar.gz ports-0688061ed171c8ecdad7fbbf15db4c790b4234fa.zip |
Notes
Diffstat (limited to 'dns/bind911')
-rw-r--r-- | dns/bind911/Makefile | 2 | ||||
-rw-r--r-- | dns/bind911/files/named.in | 29 |
2 files changed, 18 insertions, 13 deletions
diff --git a/dns/bind911/Makefile b/dns/bind911/Makefile index a10960aff03d..ba559395a9fc 100644 --- a/dns/bind911/Makefile +++ b/dns/bind911/Makefile @@ -8,7 +8,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/} PORTREVISION= 0 .else # dns/bind9xx here -PORTREVISION= 0 +PORTREVISION= 1 .endif CATEGORIES= dns net ipv6 MASTER_SITES= ISC/bind9/${ISCVERSION} diff --git a/dns/bind911/files/named.in b/dns/bind911/files/named.in index 5d5f92b45f84..33b76d151028 100644 --- a/dns/bind911/files/named.in +++ b/dns/bind911/files/named.in @@ -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 |