Fix crash when vm is not running

Due to the `set -e`, the script exited when $VM
was no in "running" state.
This commit is contained in:
Alexis Ben Miloud--Josselin 2018-07-19 11:37:29 +02:00
parent 5106b550d3
commit 555b8eb7b6
1 changed files with 1 additions and 1 deletions

View File

@ -72,7 +72,7 @@ do
DISK=0
esac
done
RUNNING=$(virsh domstate "$VM" | grep -q '^running$' && echo X)
RUNNING=$(virsh domstate "$VM" | grep -q '^running$' && echo yes || echo no)
echo "$VM $VCPU $RAM $DISK $RUNNING"
done >"$TMPFILE"