[Wylug-discuss] Tweaking resolv.conf with NetworkManager

Smylers Smylers at stripey.com
Wed Aug 3 14:48:21 UTC 2011


Hi there. I wish to provide some 'search' domains in resolv.conf (for
use when trying to resolve a bare hostname). I know which line I want in
resolv.conf to achieve this, but not how to make that line appear in
that file when I get a network connection.

What's the best way to do this so it works with NetworkManager? I'm
running Ubuntu.

I tried putting the line into /etc/resolvconf/resolv.conf.d/tail --
which I believe should be appended to the network-sent resolv.conf, but
it doesn't seem to do anything. Any ideas why?

Next I created /etc/NetworkManager/dispatcher.d/search consisting of
this line:

  echo search klonk.example.net zok.example.org >> /etc/resolv.conf

That does work, but seems very hacky. Is there a better way?

Thanks

Smylers
-- 
http://twitter.com/Smylers2



More information about the Wylug-discuss mailing list