Web lists-archives.com

Re: Why does resolv.conf keep changing?




-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Fri, Nov 03, 2017 at 10:22:33PM +0000, Roger Lynn wrote:
> On 26/10/17 13:40, Stefan Monnier wrote:
> >> Given that multiple packages potentially touch/change resolv.conf (at
> >> least resolvconf and the various DHCP clients),
> > 
> > That is not true: when resolvconf is installed, *no package* should
> > (modulo bugs) ever change /etc/resolv.conf.
> > 
> > Instead all changes go through resolvconf, which only modifies
> > /run/resolvconf/resolv.conf (and those changes usually get reflected
> > into /etc/resolv.conf by making it a symlink to that file, but that's
> > not mandatory).
> > 
> >         Stefan "who thinks resolvconf should always be installed"
> 
> I think it would be preferable for every package which wants to write to the
> resolv.conf file to be required to use the resolvconf package to do so
> (which is what I, and I think some other people, thought the situation was
> until we read this thread). Uninstalling the resolvconf package would then
> mean nothing could write to the resolv.conf file.

I strongly disagree. There are people who *want* to have (for example)
dhclient keeping their resolv.conf up to date (and no intermediate
package like resolvconf meddling). One of the things I do love about
Debian is that it goes out of its way to accomodate all of 'em (as long
as there's someone willing to do the legwork, that is).

It comes at some price, though.

> I've been in the fortunate position that I've never needed to install the
> resolvconf package and nothing has ever tried to modify my resolv.conf file.
> I've obviously led a sheltered life.

Most of us fall into two classes:

 A. All static. Nobody changes resolv.conf. All is well. Admin writes
    resolv.conf (and /etc/hosts and all).  (the "classic")
 B. Get IP address via DHCP (dhclient, NetworkManager, whatever else).
    Whatever else writes to resolv.conf. User == admin mostly doesn't
    even know what resolv.conf means, most of the time.

Without resolvconf, you're in trouble if there are several agents
caring about resolv.conf, that is, you are in class B and have
e.g. NetworkManager and say dhclient (or some systemd outgrowth,
cough, cough) trying to write to that file. Or you are in an intersection
of A and B (who said they were disjoint? The sysadmin is but an agent
more). In the latter case, you're bound to learn enough about sysadmin
to really decide whether you *want* resolvconf or not.

Me? I am in A∩B. And with no resolvconf. Stefan? Most probably in
the same set. And with resolvconf.

Distros are social projects. They have to accomodate types of humans
you never dreamt they exist. That's actually the exciting part of
it :-)

Cheers
- -- tomás


> 
> Roger
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)

iEYEARECAAYFAln9cDcACgkQBcgs9XrR2kaP6QCcDZ6J8BY8l9ZSU98sH5SG7oJq
Fn4An3dtLT0PDcUL2IiV3QdLVxLDf/fJ
=4/hS
-----END PGP SIGNATURE-----