We note in #979417 they also say
MB> Please use resolvectl instead of systemd-resolve. The latter is a
MB> compat symlink which is scheduled to go away.
anyway.
P.S., if systemd-resolved is running,
and usepeerdns writes in /etc/resolv.conf, we now get
$ resolvectl dns
Global: 168.95.192.1 168.95.1.1
Link 2 (enp1s0):
Link 3 (wlp2s0b1):
Link 4 (ppp0):
I.e., please don't test at all if systemd-resolved is running.
It doesn't conflict with usepeerdns writing in /etc/resolv.conf at all:
SYSTEMD-RESOLVED.SERVICE(8) man page says:
• Alternatively, /etc/resolv.conf may be managed by other packages,
in which case systemd-resolved will read it for DNS configuration
data. In this mode of operation systemd-resolved is consumer rather
than provider of this configuration file.
Note that the selected mode of operation for this file is detected
fully automatically, depending on whether /etc/resolv.conf is a symlink
to /run/systemd/resolve/resolv.conf or lists 127.0.0.53 as DNS server.