2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-19 01:30:21 +00:00

modify bmcsetup according to Victor's comments

This commit is contained in:
ertaozh
2017-09-06 02:44:13 -04:00
parent 40f3b88c1e
commit 586d086b95

View File

@@ -369,7 +369,7 @@ fi
if [ "$BMCVLAN" = off ]; then
TRIES=0
logger -s -t $log_label -p local4.info "Untagging BMC vlan..."
logger -s -t $log_label -p local4.info "Disabling VLAN configuration in the BMC..."
while ! ipmitool raw 0xc 1 $LANCHAN 0x14 0 0; do
snooze
let TRIES=TRIES+1
@@ -378,46 +378,33 @@ if [ "$BMCVLAN" = off ]; then
fi
done
else
let idev=0
for b in $BMCVLAN; do
TRIES=0
# Set VLAN for the current channel
while ! ipmitool -d $idev lan set $LANCHAN vlan id $b; do
snooze
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then
break;
fi
let idev=0
for b in $BMCVLAN; do
TRIES=0
# Set VLAN for the current channel
while ! ipmitool -d $idev lan set $LANCHAN vlan id $b; do
snooze
let TRIES=TRIES+1
if [ $TRIES -gt $TIMEOUT ]; then
break;
fi
done
let idev=idev+1
done
let idev=idev+1
done
fi
# update the node status to 'bmcready' for openbmc, no more configuration is needed.
if [ ! -z "$ISOPENBMC" ]; then
# To enable network configuration for openbmc
TRIES=0
bmc_config_rc=0
# Set Channel Access to apply network setting
#while ! ipmitool -d 0 lan set $LANCHAN access on; do
ipmitool -d 0 lan set $LANCHAN access on
#while ! ipmitool -d 0 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
if [ "$bmc_config_rc" = "0" ]; then
# Wait for some time for the new network setting is ready
snooze
# Wait for some time for the new network setting is ready
snooze
if ipmitool lan print 1 | grep $BMCIP >/dev/null; then
updateflag.awk $XCATMASTER 3002 "installstatus bmcready"
else
else
updateflag.awk $XCATMASTER 3002 "installstatus failed"
fi
fi