mak box type more consistent and display it anyway

- 'rpi' instead of 'ionopi' for a simple raspberry pi
+ fix dirty flag when dhcp server is modified
This commit is contained in:
2025-04-14 10:36:00 +02:00
committed by l_samenv
parent 094694df49
commit cf4706d1e2
2 changed files with 14 additions and 12 deletions

View File

@ -68,9 +68,9 @@ class BoxInfo:
CFGDIR = TOOLS / 'cfg'
BOX_TYPES = {
'00:0d:b9': 'apu', # bare apu or control box
'b8:27:eb': 'cm3', # guess iono pi max
'e4:5f:01': 'ionopi', # guess iono pi
'd8:3a:dd': 'cm4', # guess dual-eth-rpi
'b8:27:eb': 'cm3', # compute module 3 (guess iono pi max)
'e4:5f:01': 'rpi', # simple raspberry pi (guess ionopi)
'd8:3a:dd': 'cm4', # compute module 4 (guess dual-eth-rpi)
}
def __init__(self, macaddr=None, relcfg=None):
@ -96,7 +96,6 @@ class BoxInfo:
with open(ifdev) as f:
self.network_interfaces[ifname] = addr = f.read().strip().lower()
if ifname in ('eth0', 'enp1s0'):
print('my mac address', addr)
macaddr = addr
self.main_if = ifname
self.macaddr = macaddr