2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 11:10:24 +00:00

Improve port change check

When changing the port when indicating NCSI
package, the comparison was inadequate.  Improve
things by at least checking the shared/dedicated portion.

Note that it is not comparing the package id, which means
things are imperfect, though they are better than before.
However, it's not too shabby because the NIC being active
is the important part, the NCSI package change happening
later is ok, since the net config is still being put on
the correct IMM Nic.
This commit is contained in:
Jarrod Johnson
2016-09-09 15:28:27 -04:00
parent e324a58652
commit d5205de146

View File

@@ -225,9 +225,10 @@ elif [ "$IPMIMFG" == 20301 -o "$IPMIMFG" == 19046 ] ; then
# so we might be halfway through setting up when the net config
# reverts to dhcp then static, which setting a static ip for is
# considered invalid
CHECKBMCPORT=$(echo $p|awk '{print $1}')
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
logger -s -t $log_label -p local4.info "CURBMCPORT is $CURBMCPORT"
while [ -z "$CURBMCPORT" -o 0"$CURBMCPORT" -ne "$BMCPORT" ]; do
while [ -z "$CURBMCPORT" -o 0"$CURBMCPORT" -ne 0"$CHECKBMCPORT" ]; do
sleep 1
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
done