Gentoo backend does not restart nscd properly

When restarting nscd in nm_system_update_dns, the gentoo backend
checks `/etc/init.d/nscd status` to determine if nscd is running. If
the script returns non-zero,  networkmanager restarts nscd properly.
However, gentoo init
scripts return 0 when the service is started, 1 when they are not started.
Hence, networkmanager does not restart nscd. Attached patch fixes this

Index: src/backends/NetworkManagerGentoo.c
RCS file: /cvs/gnome/NetworkManager/src/backends/NetworkManagerGentoo.c,v
retrieving revision 1.18
diff -u -r1.18 NetworkManagerGentoo.c
--- src/backends/NetworkManagerGentoo.c	26 Jul 2005 22:19:09 -0000	1.18
+++ src/backends/NetworkManagerGentoo.c	4 Aug 2005 20:57:40 -0000
@@ -229,7 +229,7 @@
 void nm_system_update_dns (void)
  #ifdef NM_NO_NAMED
-	if (nm_spawn_process ("/etc/init.d/nscd status") != 0)
+	if (nm_spawn_process ("/etc/init.d/nscd status") == 0)
 		nm_spawn_process ("/etc/init.d/nscd restart");
 	nm_spawn_process("/usr/sbin/killall -q nscd");

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]