summary refs log tree commit diff
path: root/src/backends/NetworkManagerRedHat.c
diff options
context:
space:
mode:
authorMichael Biebl <biebl@debian.org>2012-06-29 20:12:44 +0200
committerMichael Biebl <biebl@debian.org>2012-06-29 20:12:44 +0200
commit867254ea7c2b193fecf8cd36cc6e5dc53c290d92 (patch)
tree7c698b403882736ab70c3efd524c3460f08c391c /src/backends/NetworkManagerRedHat.c
parentde06e5715e780baade318f3490ac7a4c9ce84e32 (diff)
Imported Upstream version 0.9.5.95 upstream/0.9.5.95
Diffstat (limited to 'src/backends/NetworkManagerRedHat.c')
-rw-r--r--src/backends/NetworkManagerRedHat.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/backends/NetworkManagerRedHat.c b/src/backends/NetworkManagerRedHat.c
index c14eb837..843b03b2 100644
--- a/src/backends/NetworkManagerRedHat.c
+++ b/src/backends/NetworkManagerRedHat.c
@@ -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");
 	}
 }