Regarding compiling BIND 9.10.3-p4 on a SystemD Distro
JLightner at dsservices.com
Wed Mar 23 13:03:35 UTC 2016
Since there are BIND packages (9.9.4) for RHEL7/CentOS7 available from default repositories you could download those packages and extract the systemd files from them and examine what they've done.
With systemd the methodology isn't that BIND notifies other things that it is up. It is that other things, if dependent upon BIND, have in their systemd files a requirement that BIND be up before they start.
That is different than Sys V init in which things started one after the other. The idea is a systemd boot is much faster as it doesn't make things wait because of order but rather only where there are dependencies.
Also as an FYI Carl Byington regularly post new builds he has done of BIND updates for RHEL/CentOS.
The most recent email he sent was for BIND 9.10 and has a link to:
I haven't used that myself but it probably also contains systemd examples you could extract.
From: bind-users-bounces at lists.isc.org [mailto:bind-users-bounces at lists.isc.org] On Behalf Of Tony Finch
Sent: Wednesday, March 23, 2016 8:36 AM
To: Reindl Harald
Cc: bind-users at lists.isc.org
Subject: Re: Regarding compiling BIND 9.10.3-p4 on a SystemD Distro
Reindl Harald <h.reindl at thelounge.net> wrote:
> > The problem that I alluded to above is that if you have services
> > that depend on the DNS, there should be a mechanism for the DNS
> > server to say when it is ready and that it's OK to start services
> > that need DNS. I don't know the right way to specify that to
> > systemd: maybe it needs a socket unit file as well?
> or just don't use "-f" and Type=forking
> If set to forking, it is expected that the process configured with
> ExecStart= will call fork() as part of its start-up. The parent
> process is expected to exit when start-up is complete and all communication channels are set up.
BIND does not do that - it forks too early. It's a bit tiresome.
log_daemon_msg "Starting name server" "BIND"
start-stop-daemon --start --oknodo --pidfile $PIDFILE \
--name named --user named --group named \
--startas $TOP/bin/named \
-- -t $TOP -u named -c /etc/named.conf
i=$(( $? ? 100 : 0 ))
while [ $i -lt 100 ] &&
! rndc status >/dev/null 2>&1
do sleep 0.1
chmod g+r $RUN/session.key
rndc status >/dev/null 2>&1
f.anthony.n.finch <dot at dotat.at> http://dotat.at/ - I xn--zr8h punycode Fair Isle, Faeroes: South or southwest 5 or 6, occasionally 7 later. Moderate or rough, occasionally very rough. Rain or showers. Moderate or good, occasionally poor.
Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list
bind-users mailing list
bind-users at lists.isc.org
More information about the bind-users