From 40f3b88c1e27bba9983ee6d6dc31b83dcdfc4bcd Mon Sep 17 00:00:00 2001 From: ertaozh Date: Fri, 1 Sep 2017 04:13:01 -0400 Subject: [PATCH] enhance bmcsetup for WSP:1. use raw to untag vlan, 2. enable ipsrc static, 3. open set access on and don't check the return code --- xCAT-genesis-scripts/bin/bmcsetup | 33 ++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index fd88f331f..bf2723081 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -293,9 +293,6 @@ logger -s -t $log_label -p local4.info "Detected LAN channel $LANCHAN" let idev=NUMBMCS if [ $IPCFGMETHOD="static" ]; then - if [ ! -z "$ISOPENBMC" ]; then - let idev=0 - fi while [ $idev -gt 0 ]; do let idev=idev-1 TRIES=0 @@ -370,6 +367,17 @@ else done fi +if [ "$BMCVLAN" = off ]; then + TRIES=0 + logger -s -t $log_label -p local4.info "Untagging BMC vlan..." + while ! ipmitool raw 0xc 1 $LANCHAN 0x14 0 0; do + snooze + let TRIES=TRIES+1 + if [ $TRIES -gt $TIMEOUT ]; then + break; + fi + done +else let idev=0 for b in $BMCVLAN; do TRIES=0 @@ -383,7 +391,7 @@ for b in $BMCVLAN; do done let idev=idev+1 done - +fi # update the node status to 'bmcready' for openbmc, no more configuration is needed. @@ -393,14 +401,15 @@ if [ ! -z "$ISOPENBMC" ]; then bmc_config_rc=0 # Set Channel Access to apply network setting #while ! ipmitool -d 0 lan set $LANCHAN access on; do - 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 + 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