2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-03 03:50:08 +00:00

Fix variable user using issue

The variable (user) whose value is BMC username is reset as userid in line 365
This commit is contained in:
zet809 2016-06-15 15:15:27 +08:00 committed by GitHub
parent 650dadf406
commit 57478143d9

View File

@ -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