Fix BMCPORT specification working with spaces

This commit is contained in:
Jarrod Johnson 2014-05-30 11:05:05 -04:00
parent 6e9d88a842
commit 27d8ca563b

View File

@ -51,6 +51,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
BMCPORT=`grep bmcport /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
if [ ! -z "$BMCPORT" ]; then
let idev=0
IFS=','
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
ipmitool -d $idev raw 0x04 0x12 0x09 0x01 0x18 0x${p}1 0x00 > /dev/null
@ -61,6 +62,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
done
let idev=idev+1
done
unset IFS
fi
elif [ "$XPROD" == "291" ]; then
LOCKEDUSERS=1
@ -70,6 +72,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
BMCPORT=`grep bmcport /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
if [ ! -z "$BMCPORT" ]; then
let idev=0
IFS=','
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
CURBMCPORT=`ipmitool -d $idev raw 0xc 2 1 0xc0 0 0 | awk '{print $2}'`
@ -79,6 +82,7 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
done
let idev=idev+1
done
unset IFS
fi
fi
fi
@ -92,6 +96,7 @@ elif [ "$IPMIMFG" == 20301 ] ; then
BMCPORT=`grep bmcport /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
if [ ! -z "$BMCPORT" ]; then
let idev=0
IFS=','
for p in $BMCPORT; do
ipmitool -d $idev raw 0xc 1 1 0xc0 $p > /dev/null
# after this change, we need to watch and wait to see that it
@ -108,6 +113,7 @@ elif [ "$IPMIMFG" == 20301 ] ; then
let idev=idev+1
done
unset IFS
fi
elif [ "$IPMIMFG" == "47488" ]; then
LOCKEDUSERS=1