aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/corosync/files
diff options
context:
space:
mode:
authorVladimir Sorokin <sorokin@altell.ru>2010-06-24 12:53:29 +0400
committerRoman I Khimov <khimov@altell.ru>2010-07-12 08:49:53 +0400
commit9d4bc378ba2f579d8653803b5e0624558d17413f (patch)
tree5de9c2cc70f5626d5e7d106a0ee5e210a89ee482 /recipes/corosync/files
parentf65a2a31d30291ce81ce3b4042b41cf66bb41810 (diff)
downloadopenembedded-9d4bc378ba2f579d8653803b5e0624558d17413f.tar.gz
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@altell.ru> Signed-off-by: Roman I Khimov <khimov@altell.ru>
Diffstat (limited to 'recipes/corosync/files')
-rw-r--r--recipes/corosync/files/init5
1 files changed, 4 insertions, 1 deletions
diff --git a/recipes/corosync/files/init b/recipes/corosync/files/init
index fc45f433a4..7277ca905b 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