Re: When is resolv.conf written?



I have the same problem. I need to add another search domain to
/etc/resolv.conf. This is in the workplace, so the dhcp server
cannot be changed. I wrote a dispatcher script, too. And it works
well in the morning. But in every afternoon the resolv.conf will be
reverted to the default one (maybe the dhcpclient renews the lease?)

How can we use the resolvconf to add the extra search domain?

2008/11/12, Tom Horsley <tom horsley ccur com>:
> On a new ubuntu 8.10 virtual machine with network-manager
> 0.7~~svn20081018t105859-0ubuntu1 installed, I have added
> a /etc/NetworkManager/dispatcher.d/ script.
>
> 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].
>
> The script is indeed invoked (I added commands to log args
> and environment to a file). It also successfully edits the
> /etc/resolv.conf file to produce exactly what I want.
>
> Then, out of the blue, sometimes as much as two or three
> minutes later, the /etc/resolv.conf file gets written
> again and reverted to the original contents with no
> extra domains in the search directive. The dispatcher
> script is NOT invoked for this overwrite.
>
> Is NetworkManager re-writing resolv.conf every time
> the lease is renewed or something? Can we get a dispatch
> event for that?
>
> Am I going to have to write a daemon that uses inotify
> to wakeup when resolve.conf gets written and fix it
> again?
> _______________________________________________
> NetworkManager-list mailing list
> NetworkManager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list
>


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