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:
@@ -49,12 +49,15 @@ void nm_system_enable_loopback (void)
|
|||||||
/*
|
/*
|
||||||
* nm_system_update_dns
|
* nm_system_update_dns
|
||||||
*
|
*
|
||||||
* Make glibc/nscd aware of any changes to the resolv.conf file by
|
* Invalidate the nscd host cache, if it exists, since
|
||||||
* restarting nscd.
|
* we changed resolv.conf.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
void nm_system_update_dns (void)
|
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");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user