2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-24 15:05:36 +00:00

Make xCAT statelite compute node working on RHEL 8 (#6121)

* Fix function xCATCmd() and use /bin/bash instead of /bin/nice for random data

* Fix function xCATCmd() and use /bin/bash instead of /bin/nice for random data
This commit is contained in:
Gᴏɴɢ Jie
2019-03-19 15:31:43 +08:00
committed by yangsong
parent bb202cb686
commit 01beacf85e
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
#! /bin/sh
#!/bin/bash
MNTDIR="/sysroot"
LOCAL="/.sllocal/localmnt"
@ -68,9 +68,14 @@ xCATCmd () {
# $2 is the command
ARCH=`uname -m`
if [ x$ARCH = x"ppc64" -a x$OS = x"rh" ]; then
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | /usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
/usr/sbin/chroot ${MNTDIR} /usr/bin/openssl s_client -quiet -no_ssl3 \
-connect ${1} -rand /bin/bash 2>/dev/null \
<<<"<xcatrequest><command>${2}</command></xcatrequest>"
else
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 \
${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 \
-connect ${1} -rand /bin/bash 2>/dev/null \
<<<"<xcatrequest><command>${2}</command></xcatrequest>"
fi
}

View File

@ -128,7 +128,7 @@ GetSyncInfo () {
xCATCmd () {
# $1 is the xCAT server
# $2 is the command
echo "<xcatrequest>\n<command>${2}</command>\n</xcatrequest>" | LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/nice 2>/dev/null
LD_LIBRARY_PATH=${MNTDIR}/lib64:${MNTDIR}/usr/lib64 ${MNTDIR}/usr/bin/openssl s_client -quiet -no_ssl3 -connect ${1} -rand /bin/bash 2>/dev/null <<<"<xcatrequest><command>${2}</command></xcatrequest>"
}