aboutsummaryrefslogtreecommitdiffstats
path: root/dns/bind910
diff options
context:
space:
mode:
authormat <mat@FreeBSD.org>2017-04-13 18:15:18 +0800
committermat <mat@FreeBSD.org>2017-04-13 18:15:18 +0800
commit3286d1546ed3e4483e88488b7991f3892d0a0eaf (patch)
treed181b0c52a73f4dbf8174566cc2daeae6cd77c8d /dns/bind910
parentda5689e1978893ffa9bcb3a51a8722c1771a8485 (diff)
downloadfreebsd-ports-gnome-3286d1546ed3e4483e88488b7991f3892d0a0eaf.tar.gz
freebsd-ports-gnome-3286d1546ed3e4483e88488b7991f3892d0a0eaf.tar.zst
freebsd-ports-gnome-3286d1546ed3e4483e88488b7991f3892d0a0eaf.zip
Unbreak rndc calls when using non default rndc.key location.
PR: 218335 Sponsored by: Absolight
Diffstat (limited to 'dns/bind910')
-rw-r--r--dns/bind910/Makefile2
-rw-r--r--dns/bind910/files/named.in29
2 files changed, 18 insertions, 13 deletions
diff --git a/dns/bind910/Makefile b/dns/bind910/Makefile
index 9c56ea4ae3a8..31eb20e44232 100644
--- a/dns/bind910/Makefile
+++ b/dns/bind910/Makefile
@@ -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
diff --git a/dns/bind910/files/named.in b/dns/bind910/files/named.in
index 5d5f92b45f84..33b76d151028 100644
--- a/dns/bind910/files/named.in
+++ b/dns/bind910/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