From 2d706b9c75ec98900ab9214dd6f5ae72859b53e7 Mon Sep 17 00:00:00 2001 From: Mark Gurevich Date: Tue, 22 Oct 2019 11:51:23 -0400 Subject: [PATCH] bmcsetup Other LAN and 802.3 LAN for Channel Medium Type --- xCAT-genesis-scripts/usr/bin/bmcsetup | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/xCAT-genesis-scripts/usr/bin/bmcsetup b/xCAT-genesis-scripts/usr/bin/bmcsetup index fa5955adb..15d5af578 100755 --- a/xCAT-genesis-scripts/usr/bin/bmcsetup +++ b/xCAT-genesis-scripts/usr/bin/bmcsetup @@ -271,14 +271,16 @@ fi LAN_MED_TYPE="802.3" if [ ! -z "$ISOPENBMC" ]; then - # Overvide the default value for OpenBMC - LAN_MED_TYPE="Other LAN" + # For OpenBMC, the value of "Channel Medium Type" attribute could be "Other LAN" for FW drivers prior to OP940.01 + # and "802.3" for FW drivers OP940.01 and later + LAN_MED_TYPE="802.3|Other LAN" fi +# Loop through channels and pick the one to communicate on while [ -z "$LANCHAN" ]; do logger -s -t $log_label -p local4.info "Auto detecting LAN channel..." for TLANCHAN in {1..16}; do # Try to get the channel information; then get the MAC which is used for the channel - if ipmitool channel info $TLANCHAN 2> /dev/null | grep "$LAN_MED_TYPE" > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then + if ipmitool channel info $TLANCHAN 2> /dev/null | grep -E "$LAN_MED_TYPE" > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; then LANCHAN=$TLANCHAN break; fi;