Regarding compiling BIND 9.10.3-p4 on a SystemD Distro

Tony Finch dot at dotat.at
Thu Mar 24 12:19:36 UTC 2016


Mark Andrews <marka at isc.org> wrote:
>
> That said named does wait for the loading to complete before the
> parent process exits and its exit status reflects if the load
> succeeded or not.  See ns_os_daemonize() and ns_os_started().

OK, I'm feeling pretty stupid now, and I'm sorry for saying that named
doesn't do the right thing when starting. (Maybe I didn't have a good
reason for that anti-race logic after all!) Oh well, on the bright side
it means that a systemd unit file named can in fact be quite simple, and
I get to delete some code ...

Tony.
-- 
f.anthony.n.finch  <dot at dotat.at>  http://dotat.at/  -  I xn--zr8h punycode
Southeast Iceland: Southeasterly 5 or 6, veering southwesterly 6 to gale 8,
occasionally severe gale 9 later. Moderate or rough, becoming rough or very
rough. Rain then wintry showers. Good, occasionally poor.

--- rc.named
+++ rc.named
@@ -35,15 +35,8 @@ start() {
 	log_daemon_msg "Starting name server" "BIND"
 	start-stop-daemon --start --oknodo $SSD --startas $TOP/bin/named \
 		-- -t $TOP -u named -c /etc/named.conf -L $LOGFILE
-	i=$(( $? ? 100 : 0 ))
-	while	[ $i -lt 100 ] &&
-		! rndc status >/dev/null 2>&1
-	do	sleep 0.1
-		i=$((i+1))
-	done
-	chmod g+r $RUN/session.key
-	rndc status >/dev/null 2>&1
 	log_end_msg $?
+	chmod g+r $RUN/session.key
 }

 stop() {


More information about the bind-users mailing list