1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

bug #1151: Work on 1151 bug

This commit is contained in:
Ruben S. Montero 2012-05-07 17:03:33 +02:00
parent 70677e81b7
commit b12d957326

View File

@ -25,11 +25,12 @@ deploy_id=$1
shutdown_command="virsh --connect $LIBVIRT_URI shutdown $deploy_id"
#If VM does not have ACPI enabled do not try to use it, destroy instead shutdown
if [ "x$CANCEL_NO_ACPI" = "xyes" ]; then
virsh --connect $LIBVIRT_URI dumpxml $deploy_id | grep -q acpi
if [ "x$?" != "x0" ]; then
virsh --connect $LIBVIRT_URI destroy $deploy_id
shutdown_command="virsh --connect $LIBVIRT_URI destroy $deploy_id"
fi
fi
@ -46,7 +47,7 @@ function monitor
# Issue another shutdown to cover occasional libvirt lack of attention
if [ "$count" -eq "$HALF_LOOP" ]
then
$($shutdown_command)
eval $shutdown_command
fi
let count=count+1