2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-10 06:41:31 +00:00

add set channel access on to apply network setting for OpenBMC

This commit is contained in:
ertaozh
2017-05-08 02:47:33 -04:00
parent fe8e4b800c
commit 2aa3136094

View File

@ -266,7 +266,7 @@ elif [ "$IPMIMFG" == "674" ]; then # DELL
ipmitool delloem lan set shared with lom$BMCPORT &>/dev/null
ipmitool delloem lan set shared with failover all loms &>dev/null
fi
elif [ "$IPMIMFG" == "42817" -a "$XPROD" == "16975" ]; then
elif [ "$IPMIMFG" = "42817" -a "$XPROD" = "16975" ]; then
ISOPENBMC=1
fi
@ -385,18 +385,40 @@ for b in $BMCVLAN; do
let idev=idev+1
done
# After network commands are issued, pause to allow the BMC to apply (OpenPower)
snooze
# update the node status to 'bmcready' for openbmc, no more configuration is needed.
if [ ! -z "$ISOPENBMC" ]; then
# To enable network configuration for openbmc
let idev=0
TRIES=0
bmc_config_rc=0
# Set Channel Access to apply network setting
#while ! ipmitool -d $idev lan set $LANCHAN access on; do
while ! ipmitool -d $idev raw 0x06 0x40 $LANCHAN 0x42 0x44 > /dev/null; do
snooze
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then
bmc_config_rc=1
break;
fi
done
# update the node status to 'bmcready'
if [ ! -z "$XCATMASTER" ]; then
updateflag.awk $XCATMASTER 3002 "installstatus bmcready"
if [ "$bmc_config_rc" = "0" ]; then
# Wait for some time for the new network setting is ready
snooze
updateflag.awk $XCATMASTER 3002 "installstatus bmcready"
else
updateflag.awk $XCATMASTER 3002 "installstatus failed"
fi
fi
rm -f /tmp/ipmicfg.xml
exit 0
exit $bmc_config_rc
fi
# After network commands are issued, pause to allow the BMC to apply (OpenPower)
snooze
let idev=NUMBMCS-1
for user in $BMCUS; do