mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2025-12-29 10:20:11 +01:00
backends: fix nscd condrestart for systemd installations (rh #805531)
This also inhibits pointless error message that '/etc/init.d/nscd condrestart' could not be spawned.
This commit is contained in:
parent
c5d75dcdfa
commit
247bd27e1d
1 changed files with 5 additions and 1 deletions
|
|
@ -35,7 +35,11 @@ void nm_backend_update_dns (void)
|
|||
{
|
||||
/* Invalidate the nscd host cache since we changed resolv.conf */
|
||||
if (g_file_test ("/usr/sbin/nscd", G_FILE_TEST_EXISTS | G_FILE_TEST_IS_EXECUTABLE | G_FILE_TEST_IS_REGULAR)) {
|
||||
nm_spawn_process ("/etc/init.d/nscd condrestart");
|
||||
if (g_file_test ("/etc/init.d/nscd", G_FILE_TEST_EXISTS))
|
||||
nm_spawn_process ("/etc/init.d/nscd condrestart");
|
||||
else if (g_file_test ("/bin/systemctl", G_FILE_TEST_IS_EXECUTABLE))
|
||||
nm_spawn_process ("/bin/systemctl condrestart nscd.service");
|
||||
|
||||
nm_spawn_process ("/usr/sbin/nscd -i hosts");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue