summaryrefslogtreecommitdiffstats
path: root/wrappers
diff options
context:
space:
mode:
authorNathan Kinder <nkinder@redhat.com>2009-02-20 00:14:34 +0000
committerNathan Kinder <nkinder@redhat.com>2009-02-20 00:14:34 +0000
commitc278163aebf1a440cd99b30129bde5c135553118 (patch)
treed090048c9bb6058c9947f940534660151405baa1 /wrappers
parentc39efbf86a562f655e9170a1644fc979bad0c597 (diff)
downloadds-c278163aebf1a440cd99b30129bde5c135553118.tar.gz
ds-c278163aebf1a440cd99b30129bde5c135553118.tar.xz
ds-c278163aebf1a440cd99b30129bde5c135553118.zip
Resolves: 245894
Summary: Check process name in initscript in a more cross-platform manner.
Diffstat (limited to 'wrappers')
-rw-r--r--wrappers/initscript.in5
1 files changed, 2 insertions, 3 deletions
diff --git a/wrappers/initscript.in b/wrappers/initscript.in
index 9f4676fe..9223ebac 100644
--- a/wrappers/initscript.in
+++ b/wrappers/initscript.in
@@ -139,9 +139,8 @@ start() {
if [ -f $pidfile ]; then
pid=`cat $pidfile`
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
+ name=`ps -p $pid | tail -1 | awk '{ print $4 }'`
+ if kill -0 $pid && [ $name = "ns-slapd" ]; then
echo_n " already running"
success; echo
successes=`expr $successes + 1`