Skip to content

Commit

Permalink
dns/bind9*: fix some race condition in rc script
Browse files Browse the repository at this point in the history
PR:		265994
MFH:		yes
(cherry picked from commit 36ab384)
  • Loading branch information
Michael Sinatra authored and mat813 committed Sep 28, 2022
1 parent e629fd7 commit 78b484e
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 57 deletions.
2 changes: 1 addition & 1 deletion dns/bind9-devel/Makefile
Expand Up @@ -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
Expand Down
36 changes: 18 additions & 18 deletions dns/bind9-devel/files/named.in
Expand Up @@ -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

Expand All @@ -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} \
Expand Down
2 changes: 1 addition & 1 deletion dns/bind916/Makefile
Expand Up @@ -2,7 +2,7 @@

PORTNAME= bind
PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
PORTREVISION= 0
PORTREVISION= 1
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}
PKGNAMESUFFIX= 916
Expand Down
36 changes: 18 additions & 18 deletions dns/bind916/files/named.in
Expand Up @@ -311,6 +311,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

Expand Down Expand Up @@ -346,24 +364,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} \
Expand Down
2 changes: 1 addition & 1 deletion dns/bind918/Makefile
Expand Up @@ -7,7 +7,7 @@ PORTVERSION= ${ISCVERSION:S/-P/P/:S/b/.b/:S/a/.a/:S/rc/.rc/}
PORTREVISION= 0
.else
# dns/bind918 here
PORTREVISION= 0
PORTREVISION= 1
.endif
CATEGORIES= dns net
MASTER_SITES= ISC/bind9/${ISCVERSION}
Expand Down
36 changes: 18 additions & 18 deletions dns/bind918/files/named.in
Expand Up @@ -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

Expand All @@ -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} \
Expand Down

0 comments on commit 78b484e

Please sign in to comment.