mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-31 01:56:39 +00:00
Merge pull request #6854 from cxhong/nice
Get the correct path for nice command
This commit is contained in:
commit
6ce9e1b891
@ -128,7 +128,12 @@ GetSyncInfo () {
|
||||
xCATCmd () {
|
||||
# $1 is the xCAT server
|
||||
# $2 is the command
|
||||
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 $(/usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} -rand /bin/nice 2>/dev/null
|
||||
if [ -f "/usr/bin/nice" ]; then
|
||||
RANDOMBYTES="-rand /usr/bin/nice"
|
||||
else
|
||||
RANDOMBYTES=""
|
||||
fi
|
||||
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 $(/usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -help 2>&1 | grep -m 1 -o -- -no_ssl2) -connect ${1} ${RANDOMBYTES} 2>/dev/null
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,19 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /usr/bin/nice")) {
|
||||
randombytes = "-rand /usr/bin/nice"
|
||||
} else {
|
||||
randombytes = ""
|
||||
}
|
||||
if (!system("test -f openssl")) {
|
||||
print "Error: openssl utility missing"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if ((ENVIRON["USEOPENSSLFORXCAT"]) || (ENVIRON["AIX"])) {
|
||||
server = "openssl s_client -quiet -no_ssl3 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -quiet -no_ssl3 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
if (!system("openssl s_client -help 2>&1 | grep -m 1 -q -- -no_ssl2")) {
|
||||
server = "openssl s_client -quiet -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -quiet -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
@ -1,9 +1,19 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /usr/bin/nice")) {
|
||||
randombytes = "-rand /usr/bin/nice"
|
||||
} else {
|
||||
randombytes = ""
|
||||
}
|
||||
if (!system("test -f openssl")) {
|
||||
print "Error: openssl utility missing"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (ENVIRON["USEOPENSSLFORXCAT"]) {
|
||||
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
if (!system("openssl s_client -help 2>&1 | grep -m 1 -q -- -no_ssl2")) {
|
||||
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
@ -1,9 +1,19 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /usr/bin/nice")) {
|
||||
randombytes = "-rand /usr/bin/nice"
|
||||
} else {
|
||||
randombytes = ""
|
||||
}
|
||||
if (!system("test -f openssl")) {
|
||||
print "Error: openssl utility missing"
|
||||
exit 1
|
||||
}
|
||||
|
||||
if (ENVIRON["USEOPENSSLFORXCAT"]) {
|
||||
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -no_ssl3 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
if (!system("openssl s_client -help 2>&1 | grep -m 1 -q -- -no_ssl2")) {
|
||||
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " -rand /bin/nice 2> /dev/null"
|
||||
server = "openssl s_client -no_ssl3 -no_ssl2 -connect " ENVIRON["XCATSERVER"] " "randombytes" 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
Loading…
x
Reference in New Issue
Block a user