Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-11-29 21:36:15 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-11-29 21:36:15 +0000
commit547043409798734b69820f06eee8df516e1cc9d6 (patch)
tree243d1376005fd6703b56aa2ee9d04a7e50537809
parent07e6e91f3cd49778168f693bcb52bc7b2a165c09 (diff)
Added a mac->iface lookup function, just to make the templte codes easier to read.
-rw-r--r--archinstall/lib/networking.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/archinstall/lib/networking.py b/archinstall/lib/networking.py
index 7832cf07..7fb1de0a 100644
--- a/archinstall/lib/networking.py
+++ b/archinstall/lib/networking.py
@@ -18,3 +18,6 @@ def list_interfaces(skip_loopback=True):
mac = getHwAddr(iface).replace(':', '-').lower()
interfaces[mac] = iface
return interfaces
+
+def get_interface_from_mac(mac):
+ return list_interfaces().get(mac, None) \ No newline at end of file