mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
Get the correct path for nice command
This commit is contained in:
parent
c477198310
commit
6013ccd5a1
@ -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
|
||||
NICE="/usr/bin/nice"
|
||||
else
|
||||
NICE="/bin/nice"
|
||||
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} -rand ${NICE} 2>/dev/null
|
||||
|
||||
}
|
||||
|
||||
|
@ -1,9 +1,22 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /bin/nice")) {
|
||||
nice = "/bin/nice"
|
||||
} else if (!system("test -f /usr/bin/nice")) {
|
||||
nice = "/usr/bin/nice"
|
||||
} else {
|
||||
print "Error: nice utility missing"
|
||||
exit 1
|
||||
}
|
||||
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"] " -rand "nice" 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"] " -rand "nice" 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
@ -1,9 +1,22 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /bin/nice")) {
|
||||
nice = "/bin/nice"
|
||||
} else if (!system("test -f /usr/bin/nice")) {
|
||||
nice = "/usr/bin/nice"
|
||||
} else {
|
||||
print "Error: nice utility missing"
|
||||
exit 1
|
||||
}
|
||||
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"] " -rand "nice" 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"] " -rand "nice" 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
@ -1,9 +1,22 @@
|
||||
#!/usr/bin/awk -f
|
||||
BEGIN {
|
||||
if (!system("test -f /bin/nice")) {
|
||||
nice = "/bin/nice"
|
||||
} else if (!system("test -f /usr/bin/nice")) {
|
||||
nice = "/usr/bin/nice"
|
||||
} else {
|
||||
print "Error: nice utility missing"
|
||||
exit 1
|
||||
}
|
||||
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"] " -rand "nice" 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"] " -rand "nice 2> /dev/null"
|
||||
}
|
||||
} else {
|
||||
server = "/inet/tcp/0/127.0.0.1/400"
|
||||
|
Loading…
x
Reference in New Issue
Block a user