xcat-core/xCAT/postscripts/getpostscript.awk
2009-06-25 19:18:22 +00:00

24 lines
583 B
Awk
Executable File

#!/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
}
}
}