From 52f4df342857ebfa27b3e431a6a3e8444f32044a Mon Sep 17 00:00:00 2001 From: Sheng Yang Date: Wed, 18 Apr 2012 20:08:18 -0700 Subject: [PATCH] CS-14369: Fix Quick Installation on the single host Notice, even after this fix, there would be 2 entries in the mshost table, after mgmt server restarted. But it should be harmless, since only one of them is "Up". Some message in the log would indicate something wrong with the original mshost entry, but still, it seems harmless. --- agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in b/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in index 099df35c43a..1f65edeeb6c 100755 --- a/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in +++ b/agent/distro/ubuntu/SYSCONFDIR/init.d/cloud-agent.in @@ -94,7 +94,7 @@ stop() { until [ "$count" -gt "$SHUTDOWN_WAIT" ] do - agentPid=`ps aux|grep [j]ava` + agentPid=`ps aux|grep [j]ava|grep cloud-agent` if [ "$?" -gt "0" ];then break fi @@ -102,7 +102,7 @@ stop() { let count="${count}+1" done - agentPid=`ps aux|grep [j]ava` + agentPid=`ps aux|grep [j]ava|grep cloud-agent` if [ "$?" -eq "0" ]; then agentPid=`ps aux|grep [j]ava|awk '{print $2}'` if [ "$agentPid" != "" ]; then