Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Trying to find out the least disruptive way of causing changes made to dns configuration by changing etc\resolv.conf take effect.
Man page says an application consults this file the first time it makes use of dns services.
As far as I understand, this means that if an application tried to lookup a hostname, and resolv.conf was changed later, the application will not be aware of the new dns parameters.
Does this mean that if I want to be sure all applications are using the new and correct dns paramters the only option I have is rebooting the box?
I thought 'network restart' might be a less disruptive option, but can't find any documentation saying after it is run all applications check resolv.conf
It all depends on the application.
You can't stop an application from reading resolv.conf at startup.
It you expect an application to take your new configuration into account, best it to restart this app.
For more complete informations about how your favorite app is using resolv.conf, strace and grep are your friend.
What I'm working on is a configuration utility for a linux box, which also allows a remote user to change the dns settings of the box.
It will be very hard for me to know all the applications on this box which may make dns queries, and I certainly do not want to investigate exactly in what manner they do this.
If I do not have this information, would my only option be a boot of the entire box?
would 'network restart' not be enough?
Any other ideas?
When I change my /etc/resolv.conf, it works immediately for me without restarting any services. of course I am a human giving commands like ping, and using the browser, but firefox does respond to the change the minute I make it. I can't speak for my backgroundish-software, but as mentioned previously, simply restarting the application should allow it to query the "new" resolv.conf.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.