From f7b210b0b8b9f10aabee21ccf25ca8af1dfc274d Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Wed, 6 Sep 2017 13:30:51 -0400 Subject: [PATCH] Ignore already disabled users in disable users Some IPMI implementations would list a lot of useless names. Have those get ignored if 'NO ACCESS' --- xCAT-genesis-scripts/bin/bmcsetup | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index fd7e8fe18..b237613c9 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -440,7 +440,7 @@ for user in $BMCUS; do if [ "$user" = "" ]; then continue fi - DISABLEUSERS=$(ipmitool user list $LANCHAN|awk '{print $1}'|grep -v ID) + DISABLEUSERS=$(ipmitool user list $LANCHAN|grep -v ^ID|grep -v 'NO ACCESS$'|awk '{print $1}') # Get the User Slots USERSLOT=`ipmitool -d $idev user list $LANCHAN |grep -v ^ID|awk '{print $1 " " $2}'|grep -w "$BMCUS"|awk '{print $1}'` if [ -z "$USERSLOT" ]; then