From e5c6039855972a259a0acc8a34ef2771c25bdafa Mon Sep 17 00:00:00 2001 From: adorsey-NOAA Date: Tue, 7 Apr 2020 12:45:51 -0400 Subject: [PATCH] Update bmcsetup --- xCAT-genesis-scripts/usr/bin/bmcsetup | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/xCAT-genesis-scripts/usr/bin/bmcsetup b/xCAT-genesis-scripts/usr/bin/bmcsetup index 6883855cf..218ac2704 100755 --- a/xCAT-genesis-scripts/usr/bin/bmcsetup +++ b/xCAT-genesis-scripts/usr/bin/bmcsetup @@ -433,15 +433,16 @@ for user in $BMCUS; do if [ -z "$USERSLOT" ]; then USERSLOT=$((`ipmitool raw 6 0x44 1 1|awk '{print $3}'` + 1)) fi - if [ "$USERSLOT" == 0 -o -z "$LOCKEDUSERS" ]; then USERSLOT=2; fi - # automatically find first unlocked user slot - for slot in {1..16}; do - USERLOCKED=`ipmitool channel getaccess $LANCHAN $slot | grep Fixed | awk '{print $4}'` - if [ "$USERLOCKED" == "No" ]; then - USERSLOT=$slot - break - fi - done + if [ "$USERSLOT" == 0 -o -z "$LOCKEDUSERS" ]; then + # automatically find first unlocked user slot + for slot in {1..16}; do + USERLOCKED=`ipmitool channel getaccess $LANCHAN $slot | grep Fixed | awk '{print $4}'` + if [ "$USERLOCKED" == "No" ]; then + USERSLOT=$slot + break + fi + done + fi if [ "$ISITE" = 1 ]; then allowcred.awk & CREDPID=$!