Re: When is resolv.conf written?



> > The purpose of this script is to edit the /etc/resolv.conf
> > and add items to the search directive when an interface
> > comes up. [I'd love to add the proper search directive to
> > the DHCP server, but the dhcp protocol doesn't support
> > search list info].
> 
> It should, that's what the 'domain_search' option is for. (RFC 3397,
> option 119).

That RFC appears to be a proposal that isn't widely implemented.
There is nothing on my DHCP host machine that indicates there
is any support for it.

> If you didn't know, you can add your own custom searches to the
> connection using the connection editor, look in the IP4 tab.

How would I know? There is absolutely no documentation of NM
anywhere :-).

I just tried it on the ubuntu virtual machine, and the field
for typing in the search list is disabled when the connection
kind is "Automatic (DHCP)", it becomes enabled when I select
"Automatic (DHCP) addresses only", but at that point a bunch
of other fields also become enabled which seem to imply I have
to manually specify things like the DNS server as well as the
search list. (Maybe I don't need to fill them in, but
"addresses only" is too cryptic for me to guess what it might
mean, and there is no help button on the dialog).

Anyway, for now, I finally found a wonderful solution:

edit /etc/resolv.conf
chattr +i /etc/resolv.conf

Now NetworkManager can't modify it, and since the machine is always
on the same network, it is always right :-).

(For God's sake, don't teach NetworkManager to remove the
immutable attribute so it can modify the file anyway :-).


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