packages: glibc/nscd.init - upstart controlled
glen
glen at pld-linux.org
Sat Jul 30 19:12:47 CEST 2011
Author: glen Date: Sat Jul 30 17:12:47 2011 GMT
Module: packages Tag: HEAD
---- Log message:
- upstart controlled
---- Files affected:
packages/glibc:
nscd.init (1.18 -> 1.19)
---- Diffs:
================================================================
Index: packages/glibc/nscd.init
diff -u packages/glibc/nscd.init:1.18 packages/glibc/nscd.init:1.19
--- packages/glibc/nscd.init:1.18 Fri May 1 12:55:33 2009
+++ packages/glibc/nscd.init Sat Jul 30 19:12:42 2011
@@ -53,6 +53,15 @@
fi
}
+upstart_controlled --except reload
+
+# return true if service is considered "up"
+# with upstart, upstart is consulted
+# otherwise lockfile in subsys must exist
+is_service_up() {
+ use_upstart && is_upstart_running "$1" || [ -f /var/lock/subsys/"$1" ]
+}
+
RETVAL=0
# See how we were called.
case "$1" in
@@ -73,7 +82,7 @@
condrestart 7
;;
reload)
- if [ -f /var/lock/subsys/nscd ]; then
+ if is_service_up nscd; then
for db in passwd group hosts; do
show "Invalidating %s cache" $db; busy
nscd -i $db && ok || fail
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/glibc/nscd.init?r1=1.18&r2=1.19&f=u
More information about the pld-cvs-commit
mailing list