[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Changing nameservers - WAS "Which resolv.conf file?"



Le 01/08/2019 à 20:06, Greg Wooledge a écrit :
On Thu, Aug 01, 2019 at 07:58:56PM +0200, Pascal Hambourg wrote:
Le 01/08/2019 à 18:18, David Wright a écrit :

I think that a lot of people install resolvconf (deliberately or
incidentally) without really understanding what it's for or what
it does. Then, because most people naturally check the contents of
/etc/resolv.conf, they indulge in all sorts of cargo-cult behaviour
to pummel it into submission; the most extreme I've seen being
editing followed by chattr +i.

AFAIK it is also the most inefficient : upon installation, resolvconf
replaces the regular file /etc/resolv.conf with a symlink pointing to a
volatile temporary file in /run (tmpfs), so the immutable attribute has no
effect if set on the symlink and will be reset at the next boot if set on
the target file in /run.

It's the most inefficient only because of bug #860928, which means you
need to add a cron job to clean up all the stray temp files that get
left behind.

This bug has nothing to do with the immutable attribute efficiency. It is just another example of bad things that may happen when you do things wrong.

The controversy surrounding chattr +i /etc/resolv.conf is why it's listed
as the last option on the wiki.  But if #860928 were to be fixed, it
wouldn't be "inefficient" at all.  It's actually the simplest choice.

Yes, a quick and dirty hack is simple. But then you have to deal with the adverse side effects such as the bug mentionned above. So in the end, was it really the simplest choice ?

People who object to chattr do so on philosophical grounds, not
performance benchmark grounds.

Huh ? Why are you bringing performance benchmarks ?

I don't even know how many times I've posted the wiki link in this thread,

I do not care what the wiki says. It is not an authoritative source.


Reply to: