Re: NM /etc/resolv.conf search



On Mon, 2007-01-15 at 11:15 +0100, Grant Williamson wrote:
> Hi,
> whats the way to customize the "search" list for host-name lookup in 
> /etc/resolv.conf when using Networkmanager.
> i.e. if a dhcp server does not provide this information how I can 
> customize so everytime I bring up a device it will be present.
> 
> I used to use something like ...
> cat /etc/sysconfig/network
> new_domain_name="${new_domain_name} home.com"
> 
> dhclient-script would then prepend this, how should this be done(system 
> wide) using RHEL5 beta2 and NetworkManager?

I'ts not possible right now, but you _could_ use the
NetworkManagerDispatcher service, which allows you to execute scripts
when a device comes up.  Use chkconfig (or
System->Administration->Services) and enable the
NetworkManagerDispatcher service.  Somewhere around there is a site with
examples of scripts that you could work from.

You could, for example, use dbus-send to figure out what network you're
on when your script gets the connection event, and then the script could
add the required 'search' lines to /etc/resolv.conf.

dan





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