From dc8c982e6f56f119b7bc5a5d5bd6095460275be8 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Mon, 2 Mar 2009 20:12:48 +0000 Subject: [PATCH] -Provide bmcport implementation for YUOO bmcs -Provide workaround for YUOO username quirk git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2826 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/bmcsetup | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/xCAT-nbroot/overlay/bin/bmcsetup b/xCAT-nbroot/overlay/bin/bmcsetup index 5186bddf9..7e3af8d0a 100755 --- a/xCAT-nbroot/overlay/bin/bmcsetup +++ b/xCAT-nbroot/overlay/bin/bmcsetup @@ -28,6 +28,30 @@ BMCNM=`grep netmask /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` BMCUS=`grep username /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` BMCPW=`grep password /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` IPMIVER=`ipmitool mc info|grep ^IPMI|awk '{print $4}'` +IPMIMFG=`ipmitool mc info|grep "^Manufacturer ID"|awk '{print $4}'` +if [ "$IPMIMFG" == 2 ]; then #IBM + IBMFAM=`ipmitool raw 0x3a 0x50 |head -n 1| awk '{print $1 $2 $3 $4}'` + if [ "$IBMFAM" == "59554f4f" ]; then + #BMC YUOO family insists that username change on each set + if [ -z "$BMCUS" ]; then #blank user, set to foo first + ipmitool user set name 2 "foo"; + else + TEMPUSER=`echo $BMCUS|sed -e 's/'^.//'` + if [ -z "$TEMPUSER" ]; then #was one character, set it to foo first + ipmitool user set name 2 "foo"; + else #still non blank, can use tempuser as safe temporary value + ipmitool user set name 2 $TEMPUSER + fi + fi + BMCPORT=`grep bmcport /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` + if [ ! -z "$BMCPORT" ]; then + ipmitool raw 0xc 1 1 0xc0 $BMCPORT + fi + fi +fi + + + TRIES=0 while ! ipmitool lan set 1 ipsrc static; do sleep 1