dns configuration question
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.
thanks for your reply.
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?
I believe you need NIS or NYS or NIS+
The purpose of NIS is to handle the dns on a network.
Check google for more information about that.
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.
|All times are GMT -5. The time now is 09:01 PM.|