From 741afd274dade40adbf9079628dffb8a8099fd06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vin=C3=ADcius=20Ferr=C3=A3o?= <2031761+viniciusferrao@users.noreply.github.com> Date: Thu, 20 Aug 2026 22:43:05 -0300 Subject: [PATCH] fix(genesis): select the default BMC LAN --- .../xcat-genesis-discovery/files/genesis-discover | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-builder/oe/meta-xcat-genesis/recipes-xcat/xcat-genesis-discovery/files/genesis-discover b/xCAT-genesis-builder/oe/meta-xcat-genesis/recipes-xcat/xcat-genesis-discovery/files/genesis-discover index 5bcd36c5a..0051d1dc5 100755 --- a/xCAT-genesis-builder/oe/meta-xcat-genesis/recipes-xcat/xcat-genesis-discovery/files/genesis-discover +++ b/xCAT-genesis-builder/oe/meta-xcat-genesis/recipes-xcat/xcat-genesis-discovery/files/genesis-discover @@ -179,8 +179,12 @@ if command -v "$ipmitool_command" >/dev/null 2>&1 \ lan_channel=$("$ipmitool_command" sol info 2>/dev/null \ | awk -F ':' '/Payload Channel/ {gsub(/[[:space:]]/, "", $2); print $2; exit}' \ || true) - bmc_data=$("$ipmitool_command" lan print "$lan_channel" 2>/dev/null \ - || "$ipmitool_command" lan print 2>/dev/null || true) + if [[ -n $lan_channel ]]; then + bmc_data=$("$ipmitool_command" lan print "$lan_channel" 2>/dev/null \ + || "$ipmitool_command" lan print 2>/dev/null || true) + else + bmc_data=$("$ipmitool_command" lan print 2>/dev/null || true) + fi bmc_source=$(awk -F ':' \ '/IP Address Source/ {sub(/^[[:space:]]+/, "", $2); print $2; exit}' \ <<<"$bmc_data")