NetworkManager and extra options in /etc/resolv.conf

Ian Chapman packages at amiga-hardware.com
Thu Jun 18 12:51:21 UTC 2009


On 18/06/09 18:31, Tarjei Knapstad wrote:
> Due to local network setup I need to add a line to /etc/resolv.conf
> ("options single-request"), otherwise I lose two out of three DNS
> lookups. Is there any way to make NM add this line when writing
> /etc/resolv.conf? (other than hacking the code and explicitly adding
> it for every network I connect to through DHCP)

Not sure if NetworkManager uses dhclient underneath, but if it does then 
you can probably use dhclient.conf(5), which lets you override, add 
local settings etc.

Alternatively, from the NetworkManager man page:

        "NetworkManager will execute scripts in the 
/etc/NetworkManager/dispatcher.d
               directory in alphabetical order in response to network 
events."

It should be fairly trivial to add a script here which is executed 
automatically when NetworkManager brings an interface online to 
append/insert additional lines into /etc/resolv.conf


-- 
Ian Chapman.




More information about the fedora-list mailing list