修复不分离环境变量的场景cm独立安装失败的问题
This commit is contained in:
parent
b741773d61
commit
7bc58dd2e8
@ -18,19 +18,13 @@
|
||||
# Description : CreateCMCACert.sh
|
||||
#############################################################################
|
||||
set -e
|
||||
envfile=$1
|
||||
if [ "$envfile" = "" ]; then
|
||||
echo "Envfile is needed."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
activePeriod=$2
|
||||
activePeriod=$1
|
||||
if [ "$activePeriod" == "" ]; then
|
||||
activePeriod=10950
|
||||
fi
|
||||
|
||||
read -s passwd
|
||||
source $envfile
|
||||
certPath=$GAUSSHOME/share/sslcert/cm
|
||||
if [ ! -f "$certPath/openssl.cnf" ]; then
|
||||
echo "CM ssl conf does not exist."
|
||||
|
@ -393,7 +393,7 @@ class InstallImpl:
|
||||
curPath = os.path.split(os.path.realpath(__file__))[0]
|
||||
createCMCACert = os.path.realpath(os.path.join(curPath, "CreateCMCACert.sh"))
|
||||
passwd = self._getPassword()
|
||||
cmd = "echo \"%s\" | sh %s %s" % (passwd, createCMCACert, self.envFile)
|
||||
cmd = "source %s; echo \"%s\" | sh %s" % (self.envFile, passwd, createCMCACert)
|
||||
# once used, set password to null and release it
|
||||
passwd = ""
|
||||
del passwd
|
||||
|
@ -123,7 +123,9 @@ General options:
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50201"] % ("envFile " + self.envFile))
|
||||
if not os.path.isfile(self.envFile):
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50210"] % ("envFile " + self.envFile))
|
||||
self.envFile = getEnvParam(self.envFile, "MPPDB_ENV_SEPARATE_PATH")
|
||||
mppdbEnv = getEnvParam(self.envFile, "MPPDB_ENV_SEPARATE_PATH")
|
||||
if mppdbEnv != "":
|
||||
self.envFile = mppdbEnv
|
||||
if self.envFile == "" or not os.path.exists(self.envFile) or not os.path.isfile(self.envFile):
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_518["GAUSS_51802"] % 'MPPDB_ENV_SEPARATE_PATH' + ".")
|
||||
|
||||
|
@ -91,7 +91,9 @@ General options:
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50201"] % ("envFile " + self.envFile))
|
||||
if not os.path.isfile(self.envFile):
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_502["GAUSS_50210"] % ("envFile " + self.envFile))
|
||||
self.envFile = getEnvParam(self.envFile, "MPPDB_ENV_SEPARATE_PATH")
|
||||
mppdbEnv = getEnvParam(self.envFile, "MPPDB_ENV_SEPARATE_PATH")
|
||||
if mppdbEnv != "":
|
||||
self.envFile = mppdbEnv
|
||||
if self.envFile == "" or not os.path.exists(self.envFile) or not os.path.isfile(self.envFile):
|
||||
CMLog.exitWithError(ErrorCode.GAUSS_518["GAUSS_51802"] % 'MPPDB_ENV_SEPARATE_PATH' + ".")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user