SOURCES: nscd.init - skip reload if service is down

glen glen at pld-linux.org
Wed Feb 28 22:04:07 CET 2007


Author: glen                         Date: Wed Feb 28 21:04:07 2007 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- skip reload if service is down

---- Files affected:
SOURCES:
   nscd.init (1.14 -> 1.15) 

---- Diffs:

================================================================
Index: SOURCES/nscd.init
diff -u SOURCES/nscd.init:1.14 SOURCES/nscd.init:1.15
--- SOURCES/nscd.init:1.14	Wed Feb 28 22:03:17 2007
+++ SOURCES/nscd.init	Wed Feb 28 22:04:02 2007
@@ -58,10 +58,14 @@
 	exit $?
 	;;
   reload)
-	for db in passwd group hosts; do
-		show "Invalidating %s cache" $db; busy
-		nscd -i $db && ok || fail
-	done
+	if [ -f /var/lock/subsys/nscd ]; then
+		for db in passwd group hosts; do
+			show "Invalidating %s cache" $db; busy
+			nscd -i $db && ok || fail
+		done
+	else
+		msg_not_running "Name Switch Cache Daemon"
+	fi
 	;;
   restart|force-reload)
 	stop
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/nscd.init?r1=1.14&r2=1.15&f=u



More information about the pld-cvs-commit mailing list