Do not restart nscd, simply invalidate the hosts cache.

git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@4003 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
This commit is contained in:
Michael Biebl
2008-08-22 19:58:13 +00:00
parent e64ef39d9c
commit 3c78ec4fbb

View File

@@ -49,12 +49,15 @@ void nm_system_enable_loopback (void)
/*
* nm_system_update_dns
*
* Make glibc/nscd aware of any changes to the resolv.conf file by
* restarting nscd.
* Invalidate the nscd host cache, if it exists, since
* we changed resolv.conf.
*
*/
void nm_system_update_dns (void)
{
nm_spawn_process ("/usr/sbin/invoke-rc.d nscd restart");
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_IS_EXECUTABLE)) {
nm_info ("Clearing nscd hosts cache.");
nm_spawn_process ("/usr/sbin/nscd -i hosts");
}
}