Clean up output
put getcert into initramfs fix openssl.cnf so it can actually be used in openssl req git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10419 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
15c641e527
commit
3fd9e5cb9c
@ -5,7 +5,7 @@ if [ -z "$XCATDEST" ]; then
|
||||
XCATDEST=$1
|
||||
fi
|
||||
#retry in case certkey.pem is not right, yet
|
||||
while ! openssl req -new -key /etc/xcat/certkey.pem -out /tmp/tls.csr -subj "/CN=`hostname`"; do
|
||||
while ! openssl req -new -key /etc/xcat/certkey.pem -out /tmp/tls.csr -subj "/CN=`hostname`" >& /dev/null; do
|
||||
sleep 1
|
||||
done
|
||||
echo "<xcatrequest>
|
||||
@ -36,7 +36,6 @@ if grep 'BEGIN CERTIFICATE' /tmp/certresp.xml > /dev/null; then
|
||||
lldptool -T -i $iface -V sysDesc enableTx=no
|
||||
done
|
||||
fi
|
||||
cat /tmp/certreq.xml
|
||||
rm /tmp/certreq.xml
|
||||
rm /tmp/certresp.xml
|
||||
kill $CREDPID
|
||||
|
@ -588,6 +588,7 @@ inst "$moddir/udpcat.awk" "/bin/udpcat.awk"
|
||||
inst "$moddir/minixcatd.awk" "/bin/minixcatd.awk"
|
||||
inst "$moddir/bmcsetup" "/bin/bmcsetup"
|
||||
inst "$moddir/allowcred.awk" "/bin/allowcred.awk"
|
||||
inst "$moddir/getcert" "/bin/getcert"
|
||||
inst "$moddir/dhclient.conf" "/etc/dhclient.conf"
|
||||
inst "$moddir/dhclient-script" "/sbin/dhclient-script"
|
||||
inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf"
|
||||
|
@ -56,7 +56,10 @@ echo 'Protocol 2' >> /etc/ssh/sshd_config
|
||||
/usr/sbin/sshd
|
||||
mkdir -p /etc/xcat
|
||||
mkdir -p /etc/pki/tls
|
||||
touch /etc/pki/tls/openssl.cnf
|
||||
echo "[ req ]
|
||||
distinguished_name = nodedn
|
||||
|
||||
[ nodedn ]" > /etc/pki/tls/openssl.cnf
|
||||
openssl genrsa -out /etc/xcat/privkey.pem 1024
|
||||
PUBKEY=`openssl rsa -in /etc/xcat/privkey.pem -pubout|grep -v "PUBLIC KEY"`
|
||||
PUBKEY=`echo $PUBKEY|sed -e 's/ //g'`
|
||||
@ -103,7 +106,17 @@ if dmidecode|grep IPMI > /dev/null; then
|
||||
modprobe ipmi_si
|
||||
modprobe ipmi_devintf
|
||||
fi
|
||||
XCATPORT=3001
|
||||
export XCATPORT
|
||||
for parm in `cat /proc/cmdline`; do
|
||||
key=`echo $parm|awk -F= '{print $1}'`
|
||||
if [ "$key" = "xcatd" ]; then
|
||||
XCATMASTER=`echo $parm|awk -F= '{print $2}'|awk -F: '{print $1}'`
|
||||
XCATPORT=`echo $parm|awk -F= '{print $2}'|awk -F: '{print $2}'`
|
||||
fi
|
||||
done
|
||||
if [ "$destiny" = "discover" ]; then #skip a query to xCAT when /proc/cmdline will do
|
||||
/bin/dodiscovery
|
||||
fi
|
||||
/bin/getcert $XCATMASTER:$XCATPORT
|
||||
/bin/sh
|
||||
|
Loading…
Reference in New Issue
Block a user