2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-07-25 22:01:11 +00:00
Files
xcat-core/xCAT/postscripts/startsyncfiles.awk
Gᴏɴɢ Jie ec56baf36f Revise openssl settings for RHEL 8 (#5967)
* Remove the RANDFILE from openssl.cnf. This is out-of-date in opessl beyond version 1.1.1a.

* Update openssl.cnf.tmpl to the latest one from openssl 1.1.1a source

* Revise openssl.cnf.tmpl based on the latest one from openssl 1.1.1a source

* Remove `-no_ssl2' command line argument for openssl, totally.
2019-01-28 16:35:31 +08:00

35 lines
820 B
Awk
Executable File

#!/usr/bin/awk -f
BEGIN {
if (ENVIRON["USEOPENSSLFORXCAT"]) {
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " 2> /dev/null"
} else {
server = "/inet/tcp/0/127.0.0.1/400"
}
quit = "no"
exitcode = 0
print "<xcatrequest>" |& server
print " <command>syncfiles</command>" |& server
if(RCP){
print " <arg>-r</arg>" |& server
print " <arg>"RCP"</arg>" |& server
}
print "</xcatrequest>" |& server
while (server |& getline) {
if (match($0,"<serverdone>")) {
quit = "yes"
}
if ((match($0,"<errorcode>") && !match($0,"<errorcode>0")) \
|| (match($0,"<error>") && !match($0,"<error>0")) ) {
exitcode = 1
}
if (match($0,"</xcatresponse>") && match(quit,"yes")) {
close(server)
exit exitcode
}
}
}