[Fedora-directory-commits] ldapserver/wrappers initscript.in, 1.11, 1.12
Nathan Kinder
nkinder at fedoraproject.org
Tue Feb 17 23:21:07 UTC 2009
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.25, 1.26
- Next message (by thread): [Fedora-directory-commits] coolkey/src/libckyapplet cky_applet.c, 1.1, 1.2 cky_applet.h, 1.1, 1.2 cky_factory.c, 1.1, 1.2 cky_factory.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: nkinder
Update of /cvs/dirsec/ldapserver/wrappers
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv23924/wrappers
Modified Files:
initscript.in
Log Message:
Resolves: 245894
Summary: Make init script verify that existing pidfile refers to a ns-slapd process.
Index: initscript.in
===================================================================
RCS file: /cvs/dirsec/ldapserver/wrappers/initscript.in,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- initscript.in 29 Jan 2009 23:41:35 -0000 1.11
+++ initscript.in 17 Feb 2009 23:21:05 -0000 1.12
@@ -138,7 +138,10 @@
server_running=0
if [ -f $pidfile ]; then
pid=`cat $pidfile`
- if kill -0 $pid > /dev/null 2>&1 ; then
+ instlockfile="@localstatedir@/lock/@package_name@/slapd-$instance/server/$pid"
+ if kill -0 $pid && \
+ [ $(awk '{print $2}' /proc/$pid/stat) = "(ns-slapd)" ] \
+ > /dev/null 2>&1 ; then
echo_n " already running"
success; echo
successes=`expr $successes + 1`
@@ -146,7 +149,9 @@
else
echo " not running, but pid file exists"
echo_n " $instance... attempting to start anyway"
- rm -f $pidfile
+ # Clean up the instance lockfile since we know the pid. The
+ # pidfiles will get cleaned up below.
+ rm -f $instlockfile
fi
fi
server_started=0
- Previous message (by thread): [Fedora-directory-commits] ldapserver/ldap/admin/src/scripts DSMigration.pm.in, 1.25, 1.26
- Next message (by thread): [Fedora-directory-commits] coolkey/src/libckyapplet cky_applet.c, 1.1, 1.2 cky_applet.h, 1.1, 1.2 cky_factory.c, 1.1, 1.2 cky_factory.h, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Fedora-directory-commits
mailing list