From 547043409798734b69820f06eee8df516e1cc9d6 Mon Sep 17 00:00:00 2001 From: Anton Hvornum Date: Sun, 29 Nov 2020 21:36:15 +0000 Subject: Added a mac->iface lookup function, just to make the templte codes easier to read. --- archinstall/lib/networking.py | 3 +++ 1 file changed, 3 insertions(+) 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 -- cgit v1.2.3-70-g09d2