allow predictable network interfaces

on dual-eth-raspi:
- eth0 -> end0
- eth1 -> enx...
This commit is contained in:
2025-06-27 16:02:38 +02:00
committed by l_samenv
parent fe95372127
commit ab195cc90f
5 changed files with 40 additions and 14 deletions

View File

@ -95,7 +95,7 @@ class BoxInfo:
ifname = f'eth{int(ifname[3]) - 1}'
with open(ifdev) as f:
self.network_interfaces[ifname] = addr = f.read().strip().lower()
if ifname in ('eth0', 'enp1s0'):
if ifname in ('eth0', 'enp1s0', 'end0'):
macaddr = addr
self.main_if = ifname
self.macaddr = macaddr