For whatever it's worth, the logic to replace or not replace
/etc/resolv.conf has gone through a bunch of adjustments, but currently,
as far as I can see it's:

if systemctl -q is-enabled systemd-resolved.service &>/dev/null &&
   ! systemd-analyze cat-config systemd/resolved.conf 2>/dev/null |
        grep -iqE '^DNSStubListener\s*=\s*(no?|false|0|off)\s*$'; then

  if ! test -e /etc/resolv.conf && ! test -L /etc/resolv.conf; then
    ln -sv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
  elif test -d /run/systemd/system/ &&
     ! mountpoint /etc/resolv.conf &>/dev/null; then
    ln -fsv ../run/systemd/resolve/stub-resolv.conf /etc/resolv.conf || :
  fi
fi

So, it's: 

* Is systemd-resolved enabled? and is there a resolved.conf file that
does not have DNSStubListener option set to off/false/no.

* If thats the case, then is there not already a /etc/resolv.conf file and
it's not a link? ie, it doesn't exist, or it's a regular file.
Then make the link.

* Else if thats not true, then see if systemd is running at all mounting
/etc/resolv.conf from somewhere else.

So, I think if you:

disable systemd-resolved 
or
make /etc/resolv.conf a real file, not a link. 
or
set 'DNSStubListener=no' in /etc/systemd/resolved.conf

It will not be replaced anymore. 

kevin

Attachment: signature.asc
Description: PGP signature

--
_______________________________________________
users mailing list -- users@lists.fedoraproject.org
To unsubscribe send an email to users-le...@lists.fedoraproject.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedoraproject.org/archives/list/users@lists.fedoraproject.org
Do not reply to spam, report it: 
https://pagure.io/fedora-infrastructure/new_issue

Reply via email to