From 67bf32985c427ad1a49f17453b33a1ad8e745ef7 Mon Sep 17 00:00:00 2001 From: daniceexi Date: Thu, 28 Apr 2011 04:33:19 +0000 Subject: [PATCH] fix the issue that it has problem to handle the regular expression \s in rh/fedora git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9422 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/getpostscript.awk | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/getpostscript.awk b/xCAT/postscripts/getpostscript.awk index 14be03f59..f58740c5f 100755 --- a/xCAT/postscripts/getpostscript.awk +++ b/xCAT/postscripts/getpostscript.awk @@ -1,7 +1,7 @@ #!/usr/bin/awk -f BEGIN { if (ENVIRON["USEOPENSSLFORXCAT"]) { - server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" + server = "openssl s_client -connect " ENVIRON["XCATSERVER"] " 2> /dev/null" } else { server = "/inet/tcp/0/127.0.0.1/400" } @@ -14,8 +14,15 @@ BEGIN { print " getpostscript" |& server print "" |& server + start = 0 while (server |& getline) { - print $0 + if (match($0,"")) { + start = 1 + } + if (start == 1) { + print $0 + } + if (match($0,"")) { quit = "yes" }