From 01beacf85e3e0bdfbcb22a8da9b0eb216ed3a948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?G=E1=B4=8F=C9=B4=C9=A2=20Jie?= Date: Tue, 19 Mar 2019 15:31:43 +0800 Subject: [PATCH] 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 --- .../share/xcat/netboot/add-on/statelite/rc.localdisk | 11 ++++++++--- .../share/xcat/netboot/add-on/statelite/rc.statelite | 2 +- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk index 60102002a..204310660 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.localdisk @@ -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 "\n${2}\n" | /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 \ + <<<"${2}" else - echo "\n${2}\n" | 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 \ + <<<"${2}" fi } diff --git a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite index 89fa868ea..cef1ac789 100755 --- a/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite +++ b/xCAT-server/share/xcat/netboot/add-on/statelite/rc.statelite @@ -128,7 +128,7 @@ GetSyncInfo () { xCATCmd () { # $1 is the xCAT server # $2 is the command - echo "\n${2}\n" | 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 <<<"${2}" }