aboutsummaryrefslogtreecommitdiff
path: root/dns/bind9-devel
diff options
context:
space:
mode:
authorMichael Sinatra <michael@burnttofu.net>2022-09-28 14:17:27 +0000
committerMathieu Arnold <mat@FreeBSD.org>2022-09-28 14:19:36 +0000
commit36ab384abd0413b0e3b9ef0c8e7f994eb03d456c (patch)
tree0663845119a99a64ccf7bde22e07cb44e0244559 /dns/bind9-devel
parent963e20c81248fad134a246950a470f2b41e6a74f (diff)
downloadports-36ab384abd0413b0e3b9ef0c8e7f994eb03d456c.tar.gz
ports-36ab384abd0413b0e3b9ef0c8e7f994eb03d456c.zip
dns/bind9*: fix some race condition in rc script
PR: 265994 MFH: yes
Diffstat (limited to 'dns/bind9-devel')
-rw-r--r--dns/bind9-devel/Makefile2
-rw-r--r--dns/bind9-devel/files/named.in36
2 files changed, 19 insertions, 19 deletions
diff --git a/dns/bind9-devel/Makefile b/dns/bind9-devel/Makefile
index a30713ccc3fa..ee6d9e53b2c6 100644
--- a/dns/bind9-devel/Makefile
+++ b/dns/bind9-devel/Makefile
@@ -8,7 +8,7 @@ PORTREVISION= 0
.else
# XXX: correct version
# dns/bind9xx here
-PORTREVISION= 0
+PORTREVISION= 1
.endif
CATEGORIES= dns net
# XXX: put the ISC master_site
diff --git a/dns/bind9-devel/files/named.in b/dns/bind9-devel/files/named.in
index 0d19435000cc..ee2fbcb821a7 100644
--- a/dns/bind9-devel/files/named.in
+++ b/dns/bind9-devel/files/named.in
@@ -309,6 +309,24 @@ rndc()
named_prestart()
{
+ # Is the user using a sandbox?
+ #
+ if [ -n "${named_chrootdir}" ]; then
+ rc_flags="${rc_flags} -t ${named_chrootdir}"
+ checkyesno named_chroot_autoupdate && chroot_autoupdate
+
+ case "${altlog_proglist}" in
+ *named*)
+ ;;
+ *)
+ warn 'Using chroot without setting altlog_proglist, logging may not'
+ warn 'work correctly. Run sysrc altlog_proglist+=named'
+ ;;
+ esac
+ else
+ named_symlink_enable=NO
+ fi
+
find_pidfile
find_sessionkeyfile
@@ -334,24 +352,6 @@ named_prestart()
local line nsip firstns
- # Is the user using a sandbox?
- #
- if [ -n "${named_chrootdir}" ]; then
- rc_flags="${rc_flags} -t ${named_chrootdir}"
- checkyesno named_chroot_autoupdate && chroot_autoupdate
-
- case "${altlog_proglist}" in
- *named*)
- ;;
- *)
- warn 'Using chroot without setting altlog_proglist, logging may not'
- warn 'work correctly. Run sysrc altlog_proglist+=named'
- ;;
- esac
- else
- named_symlink_enable=NO
- fi
-
# Create an rndc.key file for the user if none exists
#
confgen_command="${_named_program_root}/sbin/rndc-confgen -a -b256 -u ${named_uid} \