Updated Branches:
  refs/heads/4.2 f9731144c -> 88882a914

CLOUDSTACK-3583: Fix for Management server stop is not removing the PID


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/88882a91
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/88882a91
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/88882a91

Branch: refs/heads/4.2
Commit: 88882a914cb3c4ff61c5d29733cac77dca67030b
Parents: f973114
Author: Saksham Srivastava <[email protected]>
Authored: Fri Oct 11 16:34:49 2013 +0530
Committer: Rajesh Battala <[email protected]>
Committed: Tue Oct 22 16:48:47 2013 +0530

----------------------------------------------------------------------
 packaging/centos63/cloud-management.rc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/88882a91/packaging/centos63/cloud-management.rc
----------------------------------------------------------------------
diff --git a/packaging/centos63/cloud-management.rc 
b/packaging/centos63/cloud-management.rc
index 35f31b2..2f04793 100755
--- a/packaging/centos63/cloud-management.rc
+++ b/packaging/centos63/cloud-management.rc
@@ -57,6 +57,8 @@ stop() {
                done
                if [ "$(ps --pid $pid | grep -c $pid)" -eq "0" ]; then
                        log_success_msg "Stopping ${NAME}:"
+                       rm -f /var/run/${NAME}.pid
+                       rm -f /var/lock/subsys/${NAME}
                else
                        log_failure_msg "Stopping ${NAME}:"
                fi
@@ -77,7 +79,7 @@ set_ulimit() {
 }
 
 handle_pid_file() {
-    if [ "$1" -ne 0 ] ; then
+     if [ "$1" -ne 0 ] && [ "$1" -ne 3 ]; then
         echo "The pid file locates at /var/run/${NAME}.pid and lock file at 
/var/lock/subsys/${NAME}.
         Starting ${NAME} will take care of them or you can manually clean up."
     fi

Reply via email to