From 6b88d504464915fca3cc875059c1ada12073fd91 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 16 Aug 2010 19:47:05 +0000 Subject: [PATCH] -Have xCAT only attempt to change user privilege if not currently accurate git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@7102 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/bmcsetup | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/xCAT-nbroot/overlay/bin/bmcsetup b/xCAT-nbroot/overlay/bin/bmcsetup index c99039498..e72c7605f 100755 --- a/xCAT-nbroot/overlay/bin/bmcsetup +++ b/xCAT-nbroot/overlay/bin/bmcsetup @@ -119,12 +119,15 @@ done TRIES=0 # Last param in ipmitool user priv is the channel to set it on. # Penguin boxes are all channel 2 -while ! ipmitool user priv $USERSLOT 4 $LANCHAN; do - sleep 1 - let TRIES=TRIES+1 +CURRPRIV=`ipmitool user list 1|grep ^$USERSLOT|awk '{print $6}'` +if [ "$CURRPRIV" != "ADMINISTRATOR" ]; then + while ! ipmitool user priv $USERSLOT 4 $LANCHAN; do + sleep 1 + let TRIES=TRIES+1 if [ $TRIES -gt $TIMEOUT ]; then break; fi -done -TRIES=0 + done + TRIES=0 +fi if [ "$CURRENTUSER" != "$BMCUS" ]; then while ! ipmitool user set name $USERSLOT $BMCUS; do sleep 1