xcat-core/xCAT/postscripts/getpostscript.awk

24 lines
583 B
Awk
Raw Normal View History

#!/usr/bin/awk -f
BEGIN {
server = "openssl s_client -quiet -connect " ENVIRON["XCATSERVER"]
quit = "no"
print "<xcatrequest>" |& server
print " <command>getpostscript</command>" |& server
print "</xcatrequest>" |& server
while (server |& getline) {
print $0
if (match($0,"<serverdone>")) {
quit = "yes"
}
if (match($0,"</xcatresponse>") && match(quit,"yes")) {
close(server)
exit
}
}
}