From 57478143d92a011d54217b749cea3c366da31ef4 Mon Sep 17 00:00:00 2001 From: zet809 Date: Wed, 15 Jun 2016 15:15:27 +0800 Subject: [PATCH] Fix variable user using issue The variable (user) whose value is BMC username is reset as userid in line 365 --- xCAT-genesis-scripts/bin/bmcsetup | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index d3bfae78f..ddef2655a 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -362,10 +362,10 @@ for user in $BMCUS; do CURRENTUSER=`ipmitool -d $idev user list $LANCHAN|grep ^$USERSLOT|awk '{print $2}'` DISABLEUSERS=`echo 1 2 3 4|sed -e s/$USERSLOT//` logger -s -t $log_label -p local4.info "CURRENTUSER=$CURRENTUSER, DISABLEUSERS=$DISABLEUSERS" - for user in $DISABLEUSERS; do + for userid in $DISABLEUSERS; do TRIES=0 # Disable the non-specified user - while ! ipmitool -d $idev user disable $user; do + while ! ipmitool -d $idev user disable $userid; do sleep 1 let TRIES=TRIES+1 if [ $TRIES -gt $TIMEOUT ]; then break; fi