-Fix various awk xCAT clients to be proper to avoid many 'Unexpected client disconnect' messages
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1919 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
593ba85f62
commit
263b5c109f
@ -3,6 +3,7 @@
|
||||
BEGIN {
|
||||
localport = ARGV[1]
|
||||
ns = "/inet/tcp/0/127.0.0.1/" localport
|
||||
canexit = 0
|
||||
|
||||
print "<xcatrequest>" |& ns
|
||||
print "<command>getdestiny</command>" |& ns
|
||||
@ -11,7 +12,9 @@ BEGIN {
|
||||
while (1) {
|
||||
if ((ns |& getline) > 0) {
|
||||
print $0 > "/tmp/destiny"
|
||||
if ($0 == "</xcatresponse>")
|
||||
if ($0 ~ /<\/serverdone>/)
|
||||
canexit = 1
|
||||
if (canexit == 1 && $0 == "</xcatresponse>")
|
||||
break
|
||||
} else { #Timeout
|
||||
close(ns)
|
||||
|
@ -3,6 +3,7 @@
|
||||
BEGIN {
|
||||
localport = ARGV[1]
|
||||
ns = "/inet/tcp/0/127.0.0.1/" localport
|
||||
canexit = 0
|
||||
|
||||
print "<xcatrequest>" |& ns
|
||||
print "<command>getbmcconfig</command>" |& ns
|
||||
@ -11,7 +12,9 @@ BEGIN {
|
||||
while (1) {
|
||||
if ((ns |& getline) > 0) {
|
||||
print $0 > "/tmp/ipmi.data"
|
||||
if ($0 == "</xcatresponse>")
|
||||
if ($0 ~ /<\/serverdone>/)
|
||||
canexit = 1
|
||||
if (canexit == 1 && $0 == "</xcatresponse>")
|
||||
break
|
||||
} else {
|
||||
close(ns)
|
||||
|
@ -3,6 +3,7 @@
|
||||
BEGIN {
|
||||
localport = ARGV[1]
|
||||
ns = "/inet/tcp/0/127.0.0.1/" localport
|
||||
canexit = 0
|
||||
|
||||
print "<xcatrequest>" |& ns
|
||||
print "<command>nextdestiny</command>" |& ns
|
||||
@ -11,7 +12,9 @@ BEGIN {
|
||||
while (1) {
|
||||
if ((ns |& getline) > 0) {
|
||||
print $0 > "/tmp/destiny"
|
||||
if ($0 == "</xcatresponse>")
|
||||
if ($0 ~ /<\/serverdone>/)
|
||||
canexit = 1
|
||||
if (canexit == 1 && $0 == "</xcatresponse>")
|
||||
break
|
||||
} else {
|
||||
close(ns)
|
||||
|
Loading…
Reference in New Issue
Block a user