Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/hardware.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds@gmail.com>2021-01-25 10:31:02 +0100
committerAnton Hvornum <anton.feeds@gmail.com>2021-01-25 10:31:02 +0100
commit68adb3108f8111b1be434bf63c03562d72bbbe6f (patch)
treec0d0f7c3f86bbb560184f7565982b68387797aed /archinstall/lib/hardware.py
parent5c696c4bc1f0d0e3abae105616fe783b85d6771a (diff)
Created an embryo for hardware detection. Supports detecting WiFi and UEFI. This fixes #44 and is a start for #82.
Diffstat (limited to 'archinstall/lib/hardware.py')
-rw-r--r--archinstall/lib/hardware.py10
1 files changed, 10 insertions, 0 deletions
diff --git a/archinstall/lib/hardware.py b/archinstall/lib/hardware.py
new file mode 100644
index 00000000..c9483919
--- /dev/null
+++ b/archinstall/lib/hardware.py
@@ -0,0 +1,10 @@
+import os
+from .networking import list_interfaces, enrichIfaceTypes
+
+def hasWifi():
+ if 'WIRELESS' in enrichIfaceTypes(list_interfaces().values()).values():
+ return True
+ return False
+
+def hasUEFI():
+ return os.path.isdir('/sys/firmware/efi') \ No newline at end of file