diff --git a/xCAT-nbroot2/allowcred.awk b/xCAT-nbroot2/allowcred.awk new file mode 100755 index 000000000..341138d3e --- /dev/null +++ b/xCAT-nbroot2/allowcred.awk @@ -0,0 +1,15 @@ +#!/usr/bin/awk -f +BEGIN { + listener = "/inet/tcp/300/0/0" + quit = "no" + + + while (match(quit,"no")) { + while ((listener |& getline) > 0) { + if (match($0,"CREDOKBYYOU?")) { + print "CREDOKBYME" |& listener + } + } + close(listener) + } +} diff --git a/xCAT-nbroot2/install b/xCAT-nbroot2/install index 168af7204..7e6873e89 100755 --- a/xCAT-nbroot2/install +++ b/xCAT-nbroot2/install @@ -587,6 +587,7 @@ inst "$moddir/dodiscovery" "/bin/dodiscovery" 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/dhclient.conf" "/etc/dhclient.conf" inst "$moddir/dhclient-script" "/sbin/dhclient-script" inst "$moddir/rsyslog.conf" "/etc/rsyslog.conf" diff --git a/xCAT-nbroot2/xcat-cmdline.sh b/xCAT-nbroot2/xcat-cmdline.sh index 9a1c5a82e..94b38c8b1 100755 --- a/xCAT-nbroot2/xcat-cmdline.sh +++ b/xCAT-nbroot2/xcat-cmdline.sh @@ -60,6 +60,7 @@ 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