diff --git a/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in index bee8e0608b0..df57c45aa3d 100755 --- a/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/centos/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -60,11 +60,19 @@ set_ulimit() { fi } +handle_pid_file() { + if [ "$1" -ne 0 ] ; then + echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management. + Starting cloud-management will take care of them or you can manually clean up." + fi +} + # See how we were called. case "$1" in status) status ${NAME} RETVAL=$? + handle_pid_file $RETVAL ;; stop) stop diff --git a/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in index 4c59e256008..e168a124a72 100755 --- a/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/fedora/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -59,11 +59,19 @@ stop() { fi } +handle_pid_file() { + if [ "$1" -ne 0 ] ; then + echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management. + Starting cloud-management will take care of them or you can manually clean up." + fi +} + # See how we were called. case "$1" in status) status ${NAME} RETVAL=$? + handle_pid_file $RETVAL ;; stop) stop diff --git a/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in b/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in index bee8e0608b0..aee0e1c27a0 100644 --- a/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in +++ b/client/distro/rhel/SYSCONFDIR/rc.d/init.d/cloud-management.in @@ -60,18 +60,27 @@ set_ulimit() { fi } + +handle_pid_file() { + if [ "$1" -ne 0 ] ; then + echo "The pid file locates at /var/run/cloud-management.pid and lock file at /var/lock/subsys/cloud-management. + Starting cloud-management will take care of them or you can manually clean up." + fi +} + # See how we were called. case "$1" in status) - status ${NAME} - RETVAL=$? - ;; + status ${NAME} + RETVAL=$? + handle_pid_file $RETVAL + ;; stop) - stop - ;; + stop + ;; restart) - stop - set start + stop + set start set_ulimit . /etc/rc.d/init.d/tomcat6 ;;