Bug 11539 - SSVM stop script doesn't work

status 11539: resolved fixed
reviewed-by: edison

Conflicts:

	console-proxy/scripts/run.sh
This commit is contained in:
frank 2011-09-22 17:42:37 -07:00
parent b06543a8db
commit ae2c5d9a6e
2 changed files with 15 additions and 3 deletions

View File

@ -32,9 +32,14 @@ do
if [ $ex -eq 0 ] || [ $ex -eq 1 ] || [ $ex -eq 66 ] || [ $ex -gt 128 ]; then if [ $ex -eq 0 ] || [ $ex -eq 1 ] || [ $ex -eq 66 ] || [ $ex -gt 128 ]; then
# permanent errors # permanent errors
sleep 5 sleep 5
elif [ $ex -eq 143 ]; then fi
# service cloud stop causes exit with 143
exit $ex # user stop agent by service cloud stop
grep 'stop' /usr/local/cloud/systemvm/user_request &>/dev/null
if [ $? -eq 0 ]; then
timestamp=$(date)
echo "$timestamp User stops cloud.com service" >> /var/log/cloud.log
exit 0
fi fi
sleep 5 sleep 5
done done

View File

@ -72,6 +72,11 @@ get_pids() {
start() { start() {
local pid=$(get_pids) local pid=$(get_pids)
if [ "$pid" != "" ]; then
echo "cloud.com sevice is already running, PID = $pid"
return 0
fi
echo -n "Starting cloud.com service (type=$TYPE) " echo -n "Starting cloud.com service (type=$TYPE) "
if [ -f $CLOUD_COM_HOME/systemvm/run.sh ]; if [ -f $CLOUD_COM_HOME/systemvm/run.sh ];
then then
@ -86,6 +91,7 @@ start() {
_failure _failure
fi fi
echo echo
echo 'start' > $CLOUD_COM_HOME/systemvm/user_request
} }
stop() { stop() {
@ -97,6 +103,7 @@ stop() {
done done
_success _success
echo echo
echo 'stop' > $CLOUD_COM_HOME/systemvm/user_request
} }
status() { status() {