diff --git a/packaging/centos63/cloud-management.rc b/packaging/centos63/cloud-management.rc index 35f31b28538..2f04793b79c 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