mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-02 05:07:19 +02:00
Merge pull request #218 from Coruscant11/fix/vm-detection-lang
Installer VM detection now not impacted by system language
This commit is contained in:
commit
534c89e20f
13
installer.sh
13
installer.sh
@ -746,9 +746,14 @@ function waCheckVMRunning() {
|
|||||||
local VM_STATE="" # Stores the state of the Windows VM.
|
local VM_STATE="" # Stores the state of the Windows VM.
|
||||||
|
|
||||||
# Obtain VM Status
|
# Obtain VM Status
|
||||||
VM_STATE=$(virsh list --all | grep -w "$VM_NAME")
|
VM_PAUSED=0
|
||||||
|
virsh list --state-paused | grep -wq "$VM_NAME" || VM_PAUSED="$?"
|
||||||
|
VM_RUNNING=0
|
||||||
|
virsh list --state-running | grep -wq "$VM_NAME" || VM_RUNNING="$?"
|
||||||
|
VM_SHUTOFF=0
|
||||||
|
virsh list --state-shutoff | grep -wq "$VM_NAME" || VM_SHUTOFF="$?"
|
||||||
|
|
||||||
if [[ $VM_STATE == *"shut off"* ]]; then
|
if [[ $VM_SHUTOFF == "0" ]]; then
|
||||||
# Complete the previous line.
|
# Complete the previous line.
|
||||||
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
||||||
|
|
||||||
@ -766,7 +771,7 @@ function waCheckVMRunning() {
|
|||||||
|
|
||||||
# Terminate the script.
|
# Terminate the script.
|
||||||
return "$EC_VM_OFF"
|
return "$EC_VM_OFF"
|
||||||
elif [[ $VM_STATE == *"paused"* ]]; then
|
elif [[ $VM_PAUSED == "0" ]]; then
|
||||||
# Complete the previous line.
|
# Complete the previous line.
|
||||||
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
||||||
|
|
||||||
@ -784,7 +789,7 @@ function waCheckVMRunning() {
|
|||||||
|
|
||||||
# Terminate the script.
|
# Terminate the script.
|
||||||
return "$EC_VM_PAUSED"
|
return "$EC_VM_PAUSED"
|
||||||
elif [[ $VM_STATE != *"running"* ]]; then
|
elif [[ $VM_RUNNING != "0" ]]; then
|
||||||
# Complete the previous line.
|
# Complete the previous line.
|
||||||
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
echo -e "${FAIL_TEXT}Failed!${CLEAR_TEXT}\n"
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user