On 11/05/12 21:05, Timothy Madden wrote: > On 05/11/2012 01:31 AM, Kahlil Hodgson wrote: >> On 10/05/12 20:55, Timothy Madden wrote: >>> >>> I would like to use dnsmasq to cache nameserver query results, and I >>> have set dhcp to prepend the 127.0.0.1 name-server to the list of >>> nameservers. dnsmasq would then automatically exclude the localhost as a >>> name server and use all the others from the list provided by dhcp. >>> >>> But it was too nice to be true, because NetworkManager was there, ready >>> to mess up anything I try to do, including the list of name servers that >>> dhclient puts in /etc/resolv.conf. >>> >>> Is there really no way to convince that idiotic piece of software that >>> it suffered too much brain damage in order for it to manage even a >>> simple eth0 interface, and that dhclient can properly take care of the >>> resolver configuration by itself ? >>> >>> Or do I have to turn it off entirely ? >>> >>> Is there a better way to have dhclient write the list of DNS servers, >>> that dnsmasq could then use ? >> >> >> Have a look in >> >> /etc/NetworkManager/dispatcher.d/11-dhclient >> >> you might be able to figure out a tweak to put 127.0.0.1 back in. > > Yes, the script enumerates and runs the dhcp-plugin scripts in > /etc/dhcp/dhclient.d/. I tried to create such a script there, but > NetworkManager still does not run it. So (a quick an dirty hack of) putting echo 'nameserver 127.0.0.1' >> /etc/resolv.conf at the end of that script doesn't help? Or does it need to go first? Kal -- Kahlil (Kal) Hodgson GPG: C9A02289 Head of Technology (m) +61 (0) 4 2573 0382 DealMax Pty Ltd (w) +61 (0) 3 9008 5281 Suite 1415 401 Docklands Drive Docklands VIC 3008 Australia "All parts should go together without forcing. You must remember that the parts you are reassembling were disassembled by you. Therefore, if you can't get them together again, there must be a reason. By all means, do not use a hammer." -- IBM maintenance manual, 1925