om代码同步

This commit is contained in:
gyt0221
2021-02-05 14:44:00 +08:00
parent b53952aa62
commit f2d28fca22
8 changed files with 44 additions and 22 deletions

View File

@ -367,12 +367,12 @@ class InstallImpl:
return: passwd
get passwd from --gsinit-parameter. if the passwd has been assigned,
the database will install with non-interactive.
"""
"""
if len(self.context.dbInitParam) == 0:
return None
passwd = None
pwdIndex = -1
for idx,param in enumerate(self.context.dbInitParam):
for idx, param in enumerate(self.context.dbInitParam):
if param.startswith("--pwpasswd="):
passwd = param[11:]
pwdIndex = idx
@ -381,8 +381,9 @@ class InstallImpl:
passwd = param[3:]
pwdIndex = idx
break
#remove initpasswd from dbInitParam. otherwise it will be printed in log.
# remove initpasswd from dbInitParam.
# otherwise it will be printed in log.
if pwdIndex > -1:
self.context.dbInitParam.pop(pwdIndex)
return passwd