|
|
|
@ -519,6 +519,8 @@ class shareLdap(imp_cl_err, imp_cl_xml, imp_cl_help, imp_cl_smcon):
|
|
|
|
|
textLines = self.execProg("/etc/init.d/slapd start", False, False)
|
|
|
|
|
if textLines and type(textLines) == types.ListType and\
|
|
|
|
|
"ok" in textLines[-1] or textLines and "ok" in textLines:
|
|
|
|
|
# Задержка нужная для виртуальной машины
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
self.printNotOK(_("Starting LDAP")+ " ...")
|
|
|
|
@ -529,6 +531,8 @@ class shareLdap(imp_cl_err, imp_cl_xml, imp_cl_help, imp_cl_smcon):
|
|
|
|
|
textLines = self.execProg("/etc/init.d/slapd restart", False, False)
|
|
|
|
|
if textLines and type(textLines) == types.ListType and\
|
|
|
|
|
"ok" in textLines[-1] or textLines and "ok" in textLines:
|
|
|
|
|
# Задержка нужная для виртуальной машины
|
|
|
|
|
time.sleep(0.5)
|
|
|
|
|
return True
|
|
|
|
|
else:
|
|
|
|
|
self.printNotOK(_("Restarting LDAP")+ " ...")
|
|
|
|
@ -1488,16 +1492,7 @@ This command is not allowed."))
|
|
|
|
|
_("Admin password for the service %s could not be found")%service+\
|
|
|
|
|
" ...")
|
|
|
|
|
return False
|
|
|
|
|
# Генератор задержек времени
|
|
|
|
|
wait = self.genSleep()
|
|
|
|
|
ldapObj = ldapFunction(adminDn, adminPw)
|
|
|
|
|
while ldapObj.getError():
|
|
|
|
|
# Задержка времени
|
|
|
|
|
try:
|
|
|
|
|
wait.next()
|
|
|
|
|
except StopIteration:
|
|
|
|
|
break
|
|
|
|
|
ldapObj = ldapFunction(adminDn, adminPw)
|
|
|
|
|
if ldapObj.getError():
|
|
|
|
|
# Удаляем одинаковые ошибки
|
|
|
|
|
listError = []
|
|
|
|
@ -7126,25 +7121,10 @@ for running replication")%bFile)
|
|
|
|
|
"""
|
|
|
|
|
tmpDn = self.clVars.Get("ld_temp_dn")
|
|
|
|
|
tmpPw = self.clVars.Get("ld_temp_pw")
|
|
|
|
|
# Генератор задержек времени
|
|
|
|
|
wait = self.genSleep()
|
|
|
|
|
ldapObj = ldapFunction(tmpDn, tmpPw)
|
|
|
|
|
while ldapObj.getError():
|
|
|
|
|
# Задержка времени
|
|
|
|
|
try:
|
|
|
|
|
wait.next()
|
|
|
|
|
except StopIteration:
|
|
|
|
|
break
|
|
|
|
|
ldapObj = ldapFunction(tmpDn, tmpPw)
|
|
|
|
|
self.ldapObj = ldapObj
|
|
|
|
|
self.conLdap = ldapObj.conLdap
|
|
|
|
|
if self.ldapObj.getError():
|
|
|
|
|
# Удаляем одинаковые ошибки
|
|
|
|
|
listError = []
|
|
|
|
|
for e in self.ldapObj.error:
|
|
|
|
|
if not e in listError:
|
|
|
|
|
listError.append(e)
|
|
|
|
|
self.ldapObj.error = listError
|
|
|
|
|
self.printERROR(_("Can not connected to LDAP server") + " ...")
|
|
|
|
|
return False
|
|
|
|
|
return True
|
|
|
|
|