aboutsummaryrefslogtreecommitdiff
path: root/dns/bind99
diff options
context:
space:
mode:
authorMathieu Arnold <mat@FreeBSD.org>2015-04-30 14:43:04 +0000
committerMathieu Arnold <mat@FreeBSD.org>2015-04-30 14:43:04 +0000
commit9fbb9b3c6d3f16cb3c5b5c9ca28305ba9c22cafd (patch)
tree705b8fdedab9b8e72e217aff1a67a07e5ac6b5eb /dns/bind99
parentfcf1576a79f9a5a2cf53bf4f0e103af25000a896 (diff)
downloadports-9fbb9b3c6d3f16cb3c5b5c9ca28305ba9c22cafd.tar.gz
ports-9fbb9b3c6d3f16cb3c5b5c9ca28305ba9c22cafd.zip
Notes
Diffstat (limited to 'dns/bind99')
-rw-r--r--dns/bind99/Makefile2
-rw-r--r--dns/bind99/files/named.in20
2 files changed, 18 insertions, 4 deletions
diff --git a/dns/bind99/Makefile b/dns/bind99/Makefile
index bfd302e5cff7..88adaebe2828 100644
--- a/dns/bind99/Makefile
+++ b/dns/bind99/Makefile
@@ -2,7 +2,7 @@
PORTNAME= bind
PORTVERSION= ${ISCVERSION:S/-P/P/}
-PORTREVISION= 2
+PORTREVISION= 3
CATEGORIES= dns net ipv6
MASTER_SITES= ISC/bind9/${ISCVERSION}
PKGNAMESUFFIX= 99
diff --git a/dns/bind99/files/named.in b/dns/bind99/files/named.in
index f3359b705c49..da1c333e4641 100644
--- a/dns/bind99/files/named.in
+++ b/dns/bind99/files/named.in
@@ -62,6 +62,10 @@ _named_confdir="${named_chrootdir}${_named_confdirroot}"
_named_program_root="${named_program%/sbin/named}"
_openssl_engines="%%LOCALBASE%%/lib/engines"
+# Needed if named.conf and rndc.conf are moved or if rndc.conf is used
+rndc_conf=${rndc_conf:-"$_named_confdir/rndc.conf"}
+rndc_key=${rndc_key:-"$_named_confdir/rndc.key"}
+
# If running in a chroot cage, ensure that the appropriate files
# exist inside the cage, as well as helper symlinks into the cage
# from outside.
@@ -186,9 +190,9 @@ named_poststart()
named_reload()
{
- # This is a one line function, but ${named_program} is not defined early
+ # 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 reload
+ ${_named_program_root}/sbin/rndc ${rndc_flags} reload
}
find_pidfile()
@@ -214,7 +218,7 @@ named_stop()
return 1
fi
echo 'Stopping named.'
- if ${_named_program_root}/sbin/rndc stop 2>/dev/null; then
+ if ${_named_program_root}/sbin/rndc ${rndc_flags} stop 2>/dev/null; then
wait_for_pids ${rc_pid}
else
echo -n 'rndc failed, trying kill: '
@@ -264,6 +268,16 @@ 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?