gentoo: fix use nscd -i to clear cache (gentoo #301720)

This commit is contained in:
Robert Piasek 2010-02-22 10:34:23 +00:00 committed by Alexander Sack
parent 4b8709629e
commit 2183af36b6

View file

@ -34,6 +34,7 @@
#include "NetworkManagerGeneric.h"
#include "NetworkManagerSystem.h"
#include "NetworkManagerUtils.h"
#include "nm-utils.h"
/*
* nm_system_enable_loopback
@ -57,11 +58,9 @@ void nm_system_enable_loopback (void)
*/
void nm_system_update_dns (void)
{
#ifdef NM_NO_NAMED
if (nm_spawn_process ("/etc/init.d/nscd status") == 0)
nm_spawn_process ("/etc/init.d/nscd restart");
#else
nm_spawn_process("/usr/bin/killall -q nscd");
#endif
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");
}
}