refs #1059 add ogIsVirtualMachine()
parent
eaee15b7d4
commit
9301d9aaaf
|
@ -309,8 +309,5 @@ def ogCheckProgram(*args):
|
||||||
return 0
|
return 0
|
||||||
|
|
||||||
def ogIsVirtualMachine():
|
def ogIsVirtualMachine():
|
||||||
output = subprocess.check_output(["dmidecode", "-s", "system-product-name"]).decode("utf-8")
|
output = subprocess.run (["dmidecode", "-s", "system-product-name"], capture_output=True, text=True).stdout
|
||||||
if "KVM" in output or "VirtualBox" in output:
|
return "KVM" in output or "VirtualBox" in output
|
||||||
return 1
|
|
||||||
else:
|
|
||||||
return 0
|
|
||||||
|
|
Loading…
Reference in New Issue