index : archinstall32 | |
Archlinux32 installer | gitolite user |
summaryrefslogtreecommitdiff |
-rw-r--r-- | archinstall/lib/hardware.py | 8 |
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py index 6f05f620..180d0b75 100644 --- a/archinstall/lib/hardware.py +++ b/archinstall/lib/hardware.py @@ -119,12 +119,12 @@ def cpu_model() -> Optional[str]: def sys_vendor() -> Optional[str]: with open(f"/sys/devices/virtual/dmi/id/sys_vendor") as vendor: - return vendor.read() + return vendor.read().strip() def product_name() -> Optional[str]: with open(f"/sys/devices/virtual/dmi/id/product_name") as product: - return product.read() + return product.read().strip() def mem_info(): @@ -144,6 +144,10 @@ def mem_total() -> Optional[str]: return mem_info()['MemTotal'] +def virtualization() -> Optional[str]: + return str(SysCommand("systemd-detect-virt")).strip('\r\n') + + def is_vm() -> bool: try: # systemd-detect-virt issues a non-zero exit code if it is not on a virtual machine |