From c0098c40397235173b11378dc2d98e36ade4fba5 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 31 Aug 2011 14:21:14 +0000 Subject: [PATCH] Alleviate race condition where dhclient-script could possibly try to talk to lldpad before lldpad is runnig, delay and background the larger, more expensive key production git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10417 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-nbroot2/xcat-cmdline.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT-nbroot2/xcat-cmdline.sh b/xCAT-nbroot2/xcat-cmdline.sh index 94b38c8b1..4af1b52a0 100755 --- a/xCAT-nbroot2/xcat-cmdline.sh +++ b/xCAT-nbroot2/xcat-cmdline.sh @@ -54,13 +54,10 @@ ssh-keygen -q -t rsa -f /etc/ssh/ssh_host_rsa_key -C '' -N '' ssh-keygen -q -t dsa -f /etc/ssh/ssh_host_dsa_key -C '' -N '' echo 'Protocol 2' >> /etc/ssh/sshd_config /usr/sbin/sshd -dhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$bootnic.pid $bootnic & -dhclient -6 -pf /var/run/dhclient6.$bootnic.pid $bootnic -lf /var/lib/dhclient/dhclient6.leases & mkdir -p /etc/xcat mkdir -p /etc/pki/tls touch /etc/pki/tls/openssl.cnf openssl genrsa -out /etc/xcat/privkey.pem 1024 -openssl genrsa -out /etc/xcat/certkey.pem 4096 PUBKEY=`openssl rsa -in /etc/xcat/privkey.pem -pubout|grep -v "PUBLIC KEY"` PUBKEY=`echo $PUBKEY|sed -e 's/ //g'` export PUBKEY @@ -81,6 +78,9 @@ echo '};' >> /var/lib/lldpad/lldpad.conf done echo '};' >> /var/lib/lldpad/lldpad.conf lldpad -d +dhclient -cf /etc/dhclient.conf -pf /var/run/dhclient.$bootnic.pid $bootnic & +dhclient -6 -pf /var/run/dhclient6.$bootnic.pid $bootnic -lf /var/lib/dhclient/dhclient6.leases & +openssl genrsa -out /etc/xcat/certkey.pem 4096 > /dev/null 2>&1 &