From b2edbcc88c0b0372a7b5a0a218687e0193dfb956 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 1 Sep 2009 18:39:07 +0000 Subject: [PATCH] -Change postscripts to be backwards compatible with 2.2 packed images (2.3 users may have to repack images) git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@4072 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/getcredentials.awk | 6 +++++- xCAT/postscripts/getpostscript.awk | 6 +++++- xCAT/postscripts/remoteshell | 2 ++ xCAT/postscripts/startsyncfiles.awk | 6 +++++- xCAT/postscripts/xcatclient | 2 ++ xCAT/postscripts/xcatdsklspost | 2 ++ xCAT/postscripts/xcatserver | 2 ++ 7 files changed, 23 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/getcredentials.awk b/xCAT/postscripts/getcredentials.awk index b2acc8938..43fc33b97 100755 --- a/xCAT/postscripts/getcredentials.awk +++ b/xCAT/postscripts/getcredentials.awk @@ -1,6 +1,10 @@ #!/usr/bin/awk -f BEGIN { - server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + if (ENVIRON["USEOPENSSLFORXCAT"]) { + server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + } else { + server = "/inet/tcp/0/127.0.0.1/400" + } quit = "no" diff --git a/xCAT/postscripts/getpostscript.awk b/xCAT/postscripts/getpostscript.awk index 93a49a455..76255f1f3 100755 --- a/xCAT/postscripts/getpostscript.awk +++ b/xCAT/postscripts/getpostscript.awk @@ -1,6 +1,10 @@ #!/usr/bin/awk -f BEGIN { - server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + if (ENVIRON["USEOPENSSLFORXCAT"]) { + server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + } else { + server = "/inet/tcp/0/127.0.0.1/400" + } quit = "no" diff --git a/xCAT/postscripts/remoteshell b/xCAT/postscripts/remoteshell index f344608b9..a4646ab81 100755 --- a/xCAT/postscripts/remoteshell +++ b/xCAT/postscripts/remoteshell @@ -40,6 +40,8 @@ fi if [ ! -x /usr/bin/openssl ]; then exit 0 fi +USEOPENSSLFORXCAT=1 #explicitly declare the 2.3 method +export USEOPENSSLFORXCAT allowcred.awk & CREDPID=$! sleep 1 diff --git a/xCAT/postscripts/startsyncfiles.awk b/xCAT/postscripts/startsyncfiles.awk index f1e7079d4..f429f3c43 100755 --- a/xCAT/postscripts/startsyncfiles.awk +++ b/xCAT/postscripts/startsyncfiles.awk @@ -1,6 +1,10 @@ #!/usr/bin/awk -f BEGIN { - server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + if (ENVIRON["USEOPENSSLFORXCAT"]) { + server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + } else { + server = "/inet/tcp/0/127.0.0.1/400" + } quit = "no" exitcode = 1 diff --git a/xCAT/postscripts/xcatclient b/xCAT/postscripts/xcatclient index 8a0196567..6f55cd011 100755 --- a/xCAT/postscripts/xcatclient +++ b/xCAT/postscripts/xcatclient @@ -7,6 +7,8 @@ if [ ! -x /usr/bin/openssl ]; then #Unless we have openssl stup exit 0 fi +USEOPENSSLFORXCAT=1 #Declare 2.3 style SSL +export USEOPENSSLFORXCAT allowcred.awk & CREDPID=$! sleep 1 diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 80abd5d37..f09b89a9e 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -46,6 +46,8 @@ fi if [ -x /usr/bin/openssl ]; then XCATSERVER="$SIP:3001" export XCATSERVER + USEOPENSSLFORXCAT=1 #Though this is the only method going forward, flag to allow backward compatibility with 2.2 generated netboot images + export USEOPENSSLFORXCAT fi mkdir -p /xcatpost; mkdir -p /tmp/postage diff --git a/xCAT/postscripts/xcatserver b/xCAT/postscripts/xcatserver index 0c4dbfa9e..3ba8eff87 100755 --- a/xCAT/postscripts/xcatserver +++ b/xCAT/postscripts/xcatserver @@ -7,6 +7,8 @@ if [ ! -x /usr/bin/openssl ]; then exit 0 fi +USEOPENSSLFORXCAT=1 +export USEOPENSSLFORXCAT allowcred.awk & CREDPID=$! sleep 1