调整设置/root/gauss_om/username环境变量的位置

This commit is contained in:
hangjin2020
2022-04-15 16:01:23 +08:00
parent 91f659b367
commit 71d4e2f7fc
3 changed files with 7 additions and 19 deletions

View File

@ -1505,12 +1505,6 @@ Common options:
"export LD_LIBRARY_PATH=$GPHOME/lib:$LD_LIBRARY_PATH"])
# set PYTHONPATH
FileUtil.writeFile(userProfile, ["export PYTHONPATH=$GPHOME/lib"])
# set om root script path
om_root_path = "%s/%s/script" % (DefaultValue.ROOT_SCRIPTS_PATH,
self.user)
FileUtil.writeFile(userProfile,
["export PATH=%s:$PATH" % om_root_path])
except Exception as e:
self.logger.logExit(str(e))
self.logger.debug("Successfully set tool ENV.")
@ -2472,6 +2466,10 @@ Common options:
dest_path, recursive=True)
self.logger.debug("Delete root scripts in om user path.")
# set om root script path
userProfile = self.getUserProfile()
FileUtil.writeFile(userProfile, ["export PATH=%s:$PATH" % om_root_path])
# delete root scripts in GPHOME
om_user_path = os.path.join(self.clusterToolPath, "script")
user_om_files = os.listdir(om_user_path)