From c7c12b5dcbad0d42135335e75eef9391e4546641 Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Wed, 7 May 2008 19:34:12 +0000 Subject: [PATCH] -Fix getpostscript and getcredentials clients to not hang when server doesn't cut them off git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1318 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/getcredentials.awk | 7 +++++++ xCAT/postscripts/getpostscript.awk | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/xCAT/postscripts/getcredentials.awk b/xCAT/postscripts/getcredentials.awk index edab825bc..94d868a88 100755 --- a/xCAT/postscripts/getcredentials.awk +++ b/xCAT/postscripts/getcredentials.awk @@ -12,5 +12,12 @@ BEGIN { while (server |& getline) { print $0 + if (match($0,"")) { + quit = "yes" + } + if (match($0,"") && match(quit,"yes")) { + close(server) + exit + } } } diff --git a/xCAT/postscripts/getpostscript.awk b/xCAT/postscripts/getpostscript.awk index a2ad423c6..039b98511 100755 --- a/xCAT/postscripts/getpostscript.awk +++ b/xCAT/postscripts/getpostscript.awk @@ -11,5 +11,12 @@ BEGIN { while (server |& getline) { print $0 + if (match($0,"")) { + quit = "yes" + } + if (match($0,"") && match(quit,"yes")) { + close(server) + exit + } } }