diff --git a/xCAT-genesis-scripts/usr/bin/bmcsetup b/xCAT-genesis-scripts/usr/bin/bmcsetup index 15d5af578..3b88424ff 100755 --- a/xCAT-genesis-scripts/usr/bin/bmcsetup +++ b/xCAT-genesis-scripts/usr/bin/bmcsetup @@ -431,6 +431,14 @@ for user in $BMCUS; do 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 [ "$ISITE" = 1 ]; then allowcred.awk & CREDPID=$!