defect 3289489: fixed the issue that this awk file hang when no entry in the policy table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@9410 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
daniceexi 2011-04-27 07:29:00 +00:00
parent c3f6cce890
commit c34f2d22f9
2 changed files with 8 additions and 3 deletions

View File

@ -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"
}
@ -16,6 +16,9 @@ BEGIN {
print "</xcatrequest>" |& server
while (server |& getline) {
if (match($0,/^\s*</)) {
print $0
}
print $0
if (match($0,"<serverdone>")) {
quit = "yes"

View File

@ -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"
}
@ -15,7 +15,9 @@ BEGIN {
print "</xcatrequest>" |& server
while (server |& getline) {
print $0
if (match($0,/^\s*</)) {
print $0
}
if (match($0,"<serverdone>")) {
quit = "yes"
}