Genesis envirenment changes to support ITE configuration
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12201 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
d060592573
commit
a322586be7
@ -70,6 +70,10 @@ if [ "$IPMIMFG" == 2 ]; then #IBM
|
||||
fi
|
||||
elif [ "$IPMIMFG" == 20301 ] ; then
|
||||
XPROD=`ipmitool mc info|grep "^Product ID"|awk '{print $4}'`
|
||||
IBMVPDV=`ipmitool raw 0x3a 0xb 2 0 16 1`
|
||||
if [ $IBMVPDV -eq 2 ]; then
|
||||
ISITE=1;
|
||||
fi
|
||||
LOCKEDUSERS=1
|
||||
BMCPORT=`grep bmcport /tmp/ipmicfg.xml |awk -F\> '{print $2}'|awk -F\< '{print $1}'`
|
||||
if [ ! -z "$BMCPORT" ]; then
|
||||
@ -162,6 +166,12 @@ if [ ! -z "$LOCKEDUSERS" ]; then
|
||||
else
|
||||
USERSLOT=2
|
||||
fi
|
||||
if [ "$ISITE" = 1 ];
|
||||
while ! remoteimmsetup
|
||||
do
|
||||
echo "Waiting for xCAT remote configuration of service processor via CMM.."
|
||||
done
|
||||
fi
|
||||
CURRENTUSER=`ipmitool -d $idev user list $LANCHAN|grep ^$USERSLOT|awk '{print $2}'`
|
||||
DISABLEUSERS=`echo 1 2 3 4|sed -e s/$USERSLOT//`
|
||||
for user in $DISABLEUSERS; do
|
||||
|
@ -596,6 +596,7 @@ inst "$moddir/minixcatd.awk" "/bin/minixcatd.awk"
|
||||
inst "$moddir/bmcsetup" "/bin/bmcsetup"
|
||||
inst "$moddir/allowcred.awk" "/bin/allowcred.awk"
|
||||
inst "$moddir/getipmi" "/bin/getipmi"
|
||||
inst "$moddir/remoteimmsetup" "/bin/remoteimmsetup"
|
||||
inst "$moddir/getdestiny" "/bin/getdestiny"
|
||||
inst "$moddir/restart" "/bin/restart"
|
||||
inst "$moddir/doxcat" "/bin/doxcat"
|
||||
|
43
xCAT-nbroot2/remoteimmsetup
Executable file
43
xCAT-nbroot2/remoteimmsetup
Executable file
@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
CREDPID=$!
|
||||
if [ -z "$XCATDEST" ]; then
|
||||
XCATDEST=$1
|
||||
fi
|
||||
if [ -z "$XCATDEST" ]; then
|
||||
for parm in `cat /proc/cmdline` ; do
|
||||
if echo $parm |grep xcatd= > /dev/null; then
|
||||
XCATDEST=`echo $parm |awk -F= '{print $2}'`
|
||||
fi
|
||||
done
|
||||
fi
|
||||
for LANCHAN in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do
|
||||
if ipmitool channel info $LANCHAN 2> /dev/null | grep 802.3 > /dev/null 2>&1 && ipmitool raw 0xc 2 $LANCHAN 5 0 0 > /dev/null 2>&1;
|
||||
then break;
|
||||
fi;
|
||||
done
|
||||
BMCMAC=`ipmitool lan print $LANCHAN|grep ^MAC|awk '{print $4}'` #bmcconfig may opt to use DHCP, if so we need to feed up the mac address
|
||||
#TODO: need a way to get the DUID the service processor may use, perhaps reserve that for 'ibmsetup' since spec doesn't touch ipv6?
|
||||
|
||||
echo "<xcatrequest>
|
||||
<command>remoteimmsetup</command>
|
||||
<bmcmac>$BMCMAC</bmcmac>
|
||||
</xcatrequest>" > /tmp/bmcreq.xml
|
||||
rm /tmp/remsetup.xml
|
||||
while [ ! -f /tmp/remsetup.xml ] || grep error /tmp/ipmicfg.xml; do
|
||||
if [ -f /tmp/remsetup.xml ]; then
|
||||
timer=60
|
||||
while [ $timer -gt 0 ]; do
|
||||
sleep 1
|
||||
echo -en "Retrying in $timer seconds \r"
|
||||
timer=$(($timer-1));
|
||||
done
|
||||
fi
|
||||
echo -en " \r";
|
||||
|
||||
if [ -f /etc/xcat/cert.pem -a -f /etc/xcat/certkey.pem ]; then #use client cert if available
|
||||
cat /tmp/bmcreq.xml | openssl s_client -key /etc/xcat/certkey.pem -cert /etc/xcat/cert.pem -connect $XCATDEST -quiet 2> /dev/null > /tmp/ipmicfg.xml
|
||||
else
|
||||
cat /tmp/bmcreq.xml | openssl s_client -connect $XCATDEST -quiet 2> /dev/null > /tmp/ipmicfg.xml
|
||||
fi
|
||||
done
|
||||
rm /tmp/bmcreq.xml
|
Loading…
Reference in New Issue
Block a user