On Mon, Sep 28, 2020 at 07:57:13AM -0500, Ian Pilcher wrote:
On 9/28/20 6:47 AM, Zbigniew Jędrzejewski-Szmek wrote:
> Instructions were already posted by Vitaly, so I won't repeat that here.
> I'll just note that the scriptlet in systemd.rpm looks for
> 'Generated by NetworkManager' in /etc/resolv.conf as an indicator that
> the file is autogenerated.
Which is a terrible idea, as has been previously mentioned. It really
only indicates that the file was once touched my NetworkManager, not
that it is currently managed.
If often let Anaconda set up a new system witha NetworkManager-managed
DHCP and then convert to a legacy network scripts-managed static IP
later. This doesn't change the DNS server or domain, so I don't bother
editing resolv.conf to remove this comment. I'm relatively certain that
this is a common pattern.
Having read your email, I've checked my /etc/resolv.conf and _removed_
the NM comment. Never bothered to touch the comment before, as I'm using
systemd-networkd for networking on the server. I would say that leaving
the comment is a common pattern.
There's not much there actually, only search domain and 'nameserver ::1',
where dnsmasq listens, providing split-horizon for my network and pihole
blacklisting of advertisment networks.
But yeah, there are no better ideas how to handle resolv.conf on upgrades.
--
Tomasz Torcz “Never underestimate the bandwidth of a station
tomek(a)pipebreaker.pl wagon filled with backup tapes.” — Jim Gray