I suspect the official way to modify DNS parameters on CentOS >= 8 and Fedora is running resolvectl, at least when resolvectl is available.
Therefore I would recommend the following mechanism when --set-dns=1:
- If
resolvectl is available and works properly, run it to modify DNS parameters. Decide at build-time or run-time?
- Else if
resolvconf is available and works properly (either openresolv or resolvconf but not resolvectl), run it to modify DNS parameters. Decide at build-time or run-time?
- Else fall back on modifying
/etc/resolv.conf directly.
I recommend the above order, resolvectl before resolvconf, because resolvconf might be available but doesn't seem to be working properly on Fedora.
Man pages:
Hopefully we can get some info from this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1815605
I suspect the official way to modify DNS parameters on CentOS >= 8 and Fedora is running
resolvectl, at least whenresolvectlis available.Therefore I would recommend the following mechanism when
--set-dns=1:resolvectlis available and works properly, run it to modify DNS parameters. Decide at build-time or run-time?resolvconfis available and works properly (either openresolv or resolvconf but not resolvectl), run it to modify DNS parameters. Decide at build-time or run-time?/etc/resolv.confdirectly.I recommend the above order,
resolvectlbeforeresolvconf, becauseresolvconfmight be available but doesn't seem to be working properly on Fedora.Man pages:
Hopefully we can get some info from this bug report:
https://bugzilla.redhat.com/show_bug.cgi?id=1815605