lucas101012 / namebench

Automatically exported from code.google.com/p/namebench
Apache License 2.0
0 stars 0 forks source link

(wishlist) Make possible to apply suggested DNS ; allow console output to let others write a script to do that #108

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Greetings.

While it's comfortable to have namebench NOT modify the system, that'd be 
also convenient or many.

Would you consider to implement an "apply now" / "revert to default" 
function ?

Also, is there a way to / would you consider to implement a console output, 
to allow someone to write a script that launches namebench and THEN auto-
apply the best DNS to the system (I'm thinking about linux here) ?

Thanks for reading

Original issue reported on code.google.com by fabio.al...@gmail.com on 12 Mar 2010 at 9:15

GoogleCodeExporter commented 8 years ago
It's beyond the scope of the namebench project to automatically apply changes.  
However, I have added 
resolv.conf style output that might be useful. It's available as of revision 
849.

./namebench.py -t resolv.conf -o /tmp/resolv.conf

You would still need some sort of script to check and make sure this file is 
not empty, and then copy it to /etc:

#!/bin/sh
./namebench.py -t resolv.conf -o /tmp/resolv.conf
if [ "`grep "^nameserver" /tmp/resolv.conf`" ]; then
  sudo cp /tmp/resolv.conf /etc/resolv.conf
fi

That's about all I am comfortable doing for this.

Original comment by helixblue on 16 May 2010 at 10:18