dns/bind9*: fix some race condition in rc script

PR:		265994
MFH:		yes
This commit is contained in:
Michael Sinatra 2022-09-28 16:17:27 +02:00 committed by Mathieu Arnold
parent 963e20c812
commit 36ab384abd
No known key found for this signature in database
GPG key ID: 79C993FC0F629D7D
6 changed files with 57 additions and 57 deletions

View file

@ -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

View file

@ -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} \

View file

@ -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

View file

@ -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
@ -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} \

View file

@ -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}

View file

@ -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} \