[oe-commits] Vladimir Sorokin : corosync: fix init script
git version control
git at git.openembedded.org
Mon Jul 12 04:51:56 UTC 2010
Module: openembedded.git
Branch: org.openembedded.dev
Commit: 9d4bc378ba2f579d8653803b5e0624558d17413f
URL: http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=9d4bc378ba2f579d8653803b5e0624558d17413f
Author: Vladimir Sorokin <sorokin at altell.ru>
Date: Thu Jun 24 12:53:29 2010 +0400
corosync: fix init script
1) use pgrep instead parsing output of "ps"
2) check if nobody needs to kill
Signed-off-by: Vladimir Sorokin <sorokin at altell.ru>
Signed-off-by: Roman I Khimov <khimov at altell.ru>
---
recipes/corosync/corosync_1.2.6.bb | 2 +-
recipes/corosync/files/init | 5 ++++-
2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/recipes/corosync/corosync_1.2.6.bb b/recipes/corosync/corosync_1.2.6.bb
index 0512148..41287a0 100644
--- a/recipes/corosync/corosync_1.2.6.bb
+++ b/recipes/corosync/corosync_1.2.6.bb
@@ -1,7 +1,7 @@
DESCRIPTION = "OSI Certified implementation of a complete cluster engine"
LICENSE = "BSD"
-PR = "r0"
+PR = "r1"
SRC_URI = " \
ftp://ftp@corosync.org/downloads/corosync-${PV}/corosync-${PV}.tar.gz \
diff --git a/recipes/corosync/files/init b/recipes/corosync/files/init
index fc45f43..7277ca9 100644
--- a/recipes/corosync/files/init
+++ b/recipes/corosync/files/init
@@ -96,7 +96,10 @@ stop() {
if [ $do_force = 1 ]; then
echo -n "Escalating... "
killall -KILL corosync
- ps | grep /usr/lib/heartbeat | sed "s,^ *,," | cut -f 1 -d ' ' | xargs kill -9
+ pids=`pgrep -f '/usr/lib/heartbeat/*'`
+ if [ -n "$pids" ]; then
+ kill -KILL $pids
+ fi
sleep 5
if
More information about the Openembedded-commits
mailing list