mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 07:33:01 +02:00
board/aarch64: use %m modifier in default xPi hostnames
The xPi's usually don't have a VPD so the chassis mac-address probed at boot is usually null in /run/system.json. This commit adds a fallbkack mechanism to populate this field so it can be used for unique hostnames even on these boards. Ths ietf-hardware.yang model does not have a notion of physical address, so we augment one tht is generic enought to be used for other hardware components than Ethernet, similar to what ietf-interfaces.yang use. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -1703,6 +1703,8 @@ def show_hardware(json):
|
||||
print(f"Manufacturer : {board['mfg-name']}")
|
||||
if board.get("serial-num"):
|
||||
print(f"Serial Number : {board['serial-num']}")
|
||||
if board.get("infix-hardware:phys-address"):
|
||||
print(f"Base MAC Address : {board['infix-hardware:phys-address']}")
|
||||
if board.get("hardware-rev"):
|
||||
print(f"Hardware Revision : {board['hardware-rev']}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user