From 5b095239c14707426d1f526518fa0bacc0d3ad87 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Fri, 22 May 2009 18:45:00 +0000 Subject: [PATCH] -Add outer retry loop for bmcsetup git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@3440 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot/overlay/bin/bmcsetup | 26 ++++++++++++++++---------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/xCAT-nbroot/overlay/bin/bmcsetup b/xCAT-nbroot/overlay/bin/bmcsetup index 7e3af8d0a..fd1ac79c7 100755 --- a/xCAT-nbroot/overlay/bin/bmcsetup +++ b/xCAT-nbroot/overlay/bin/bmcsetup @@ -16,17 +16,23 @@ allowcred.awk & CREDPID=$! modprobe ipmi_si modprobe ipmi_devintf -while ! getipmi -do - echo "Retrying retrieval of IPMI settings from server" +while [ -z "$BMCIP" ]; do + while ! getipmi + do + echo "Retrying retrieval of IPMI settings from server" + done + TIMEOUT=15 + kill $CREDPID + BMCIP=`grep bmcip /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` + BMCGW=`grep gateway /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` + 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}'` + if [ -z "$BMCIP" ]; then + echo "FAILED TO RETRIEVE SETTINGS, RETRYING in 15 seconds" + sleep 15 + fi done -TIMEOUT=15 -kill $CREDPID -BMCIP=`grep bmcip /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` -BMCGW=`grep gateway /tmp/ipmi.data |awk -F\> '{print $2}'|awk -F\< '{print $1}'` -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