fixing more bash issues
This commit is contained in:
parent
64db728731
commit
5d3dbac9ba
@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!/bin/sh -e
|
||||
|
||||
vmname="$1"
|
||||
|
||||
@ -9,7 +9,7 @@ fi
|
||||
|
||||
# this will let us know if the vm exists or not
|
||||
exists="false"
|
||||
state = "unknown"
|
||||
state="unknown"
|
||||
if virsh domuuid "$vmname" | grep -vqE '^[\t\s\n]*$'; then
|
||||
exists="true"
|
||||
|
||||
@ -21,11 +21,11 @@ if virsh domuuid "$vmname" | grep -vqE '^[\t\s\n]*$'; then
|
||||
fi
|
||||
|
||||
case "$state_code" in
|
||||
1) state = "running" ;;
|
||||
2) state = "blocked" ;;
|
||||
4) state = "stopping" ;;
|
||||
6) state = "crashed" ;;
|
||||
[357]) state = "stopped" ;;
|
||||
1) state="running" ;;
|
||||
2) state="blocked" ;;
|
||||
4) state="stopping" ;;
|
||||
6) state="crashed" ;;
|
||||
[357]) state="stopped" ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user