From 6533201cd74b5b2e318783597f59c5c891b37695 Mon Sep 17 00:00:00 2001 From: Ben Davies Date: Tue, 24 Feb 2026 14:31:51 +1300 Subject: [PATCH] Handle missing MGMT MAC address in syseeprom When the MGMT MAC address was missing from the syseeprom, /etc/init.d/networking.sh would attempt to parse the error message as a MAC address. This change explicitly handles that case by showing the user a warning and skipping steps that rely on this value. Signed-off-by: Ben Davies --- rootconf/default/etc/init.d/networking.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/rootconf/default/etc/init.d/networking.sh b/rootconf/default/etc/init.d/networking.sh index 7d66cd778..423418b92 100755 --- a/rootconf/default/etc/init.d/networking.sh +++ b/rootconf/default/etc/init.d/networking.sh @@ -198,6 +198,10 @@ if [ "$1" = "start" ] ; then # Set MAC addr for all interfaces, but leave the interfaces down. base_mac=$(onie-sysinfo -e) + if [ "$base_mac" = "ERROR:" ] ; then + log_warning_msg "Unable to retrieve management Ethernet MAC address" + onie_skip_ethmgmt_macs=yes + fi for intf in $intf_list ; do if [ "$onie_skip_ethmgmt_macs" = "no" ] ; then mac="$(mac_add $base_mac $intf_counter)"