I'm running Buster. I then had a problem with BIND and DNSSEC, so I
upgraded my bind9 package to the one in buster-backports.
But it seems that this has involved a partial rename of the systemd unit
from bind9 to named. So I now have two almost equal systemd units. And
named.service includes an "Alias=bind9.service" line, whose exact
meaning I don't understand. And named.service includes a "Wants" and a
"Before" line that bind9.service does not include (details below).
Searching for files named {named,bind9}.service gives:
28706180 0 -rw-r--r-- 1 root root 0 Apr 3 2016
/var/lib/systemd/deb-systemd-helper-enabled/multi-user.target.wants/bind9.service
262273 4 -rw-r--r-- 1 root root 364 Mar 20 2022
/lib/systemd/system/named.service
28970007 0 lrwxrwxrwx 1 root root 33 Jan 15 15:42
/etc/systemd/system/multi-user.target.wants/named.service ->
/lib/systemd/system/named.service
28968976 0 lrwxrwxrwx 1 root root 33 Apr 10 2016
/etc/systemd/system/multi-user.target.wants/bind9.service ->
/etc/systemd/system/bind9.service
28969163 4 -rw-r--r-- 1 root root 255 Jun 2 2016
/etc/systemd/system/bind9.service
I suspect that the bind9 service ought to be removed. Is that correct?
And I suspect that the first thing to do is "systemctl disable bind9" -
is that right? And then perhaps delete the bind9.service file? But
what about the "Alias=" line in named.service - does that work if
bind9.service is removed?
Right now the system is running and the backports nameserver works fine,
but I wonder if anything will go wrong on the next reboot. And I would
like to clean up the situation in a way that will not give problems when
I later upgrade the system to Bullseye. How do I do that?
Here are the unit files and unit statuses:
root@nuser:~# systemctl cat bind9
# /etc/systemd/system/bind9.service
[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target
[Service]
ExecStart=/usr/sbin/named -f -4 -u bind -t /etc/bind
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop
[Install]
WantedBy=multi-user.target
root@nuser:~# systemctl cat named
# /lib/systemd/system/named.service
[Unit]
Description=BIND Domain Name Server
Documentation=man:named(8)
After=network.target
Wants=nss-lookup.target
Before=nss-lookup.target
[Service]
EnvironmentFile=-/etc/default/named
ExecStart=/usr/sbin/named -f $OPTIONS
ExecReload=/usr/sbin/rndc reload
ExecStop=/usr/sbin/rndc stop
Restart=on-failure
[Install]
WantedBy=multi-user.target
Alias=bind9.service
root@nuser:~# systemctl status bind9
● bind9.service - BIND Domain Name Server
Loaded: loaded (/etc/systemd/system/bind9.service; enabled; vendor
preset: enabled)
Active: active (running) since Sun 2023-01-15 15:47:13 CET; 18h ago
Docs: man:named(8)
Main PID: 2349 (named)
Tasks: 8 (limit: 4691)
Memory: 47.0M
CGroup: /system.slice/bind9.service
└─2349 /usr/sbin/named -f -4 -u bind -t /etc/bind
root@nuser:~# systemctl status named
● named.service - BIND Domain Name Server
Loaded: loaded (/lib/systemd/system/named.service; enabled; vendor
preset: enabled)
Active: failed (Result: exit-code) since Sun 2023-01-15 15:42:14
CET; 18h ago
Docs: man:named(8)
Process: 1412 ExecStart=/usr/sbin/named -f $OPTIONS (code=exited,
status=1/FAILURE)
Main PID: 1412 (code=exited, status=1/FAILURE)
--
Jesper Dybdal
https://www.dybdal.dk