A modified algorithm connect to a domain

master3.3
Самоукин Алексей 14 years ago
parent a0e08996fa
commit 7a21158009

@ -1535,9 +1535,6 @@ class client(share, commandServer, encrypt):
foundMountRemote = isMount(pathRemote)
foundMountHome = isMount(pathHome)
domain = self.clVars.Get("cl_remote_host")
if not domain:
self.printWARNING(_("The computer is not in domain"))
return True
if foundMountRemote:
textLineUmount = self.umountSleepPath(pathRemote)
if not textLineUmount:
@ -1546,6 +1543,9 @@ class client(share, commandServer, encrypt):
textLineUmount = self.umountSleepPath(pathHome)
if not textLineUmount:
return False
if not domain:
self.printWARNING(_("The computer is not in domain"))
return True
# Удаляем переменные из env файлов
self.removeVars()
# Устанавливаем действие выход из домена
@ -1558,7 +1558,6 @@ class client(share, commandServer, encrypt):
self.printSUCCESS(_("Apply undomain templates"))
if not self.delDaemonAutostart("client"):
return False
# Записываем действие, введен в домен
self.printOK(_("Computer removed from domain %s")%domain + " ...")
return True
@ -1663,24 +1662,23 @@ class client(share, commandServer, encrypt):
if not foudHostSamba:
self.printERROR(_("Not found Samba server in %s")%domain)
return False
pwd = False
if self.clVars.Get("cl_remote_host") and \
self.clVars.Get("cl_remote_host") != domain:
if not self.delDomain():
return False
elif self.clVars.Get("cl_remote_host") and \
self.clVars.Get("cl_remote_host") == domain:
pwd = self.clVars.Get("cl_remote_pw")
remoteHost = self.clVars.Get("cl_remote_host")
if remoteHost:
self.printERROR(_("The computer is already in the domain %s")\
%remoteHost)
self.printWARNING(_("Before joining the domain, \
you need to remove it from the previous domain"))
self.printWARNING(_("Run 'cl-client -t'"))
return False
foundMountRemote = isMount("/var/calculate/remote")
foundMountHome = self.isMountDomainHome()
if foundMountRemote:
self.printWARNING(_("Samba resource [%s] is mount")%\
self.printERROR(_("Samba resource [%s] is mount")%\
"remote" + " ...")
return False
else:
if pwd:
userPwd = pwd
else:
userPwd=self.getUserPassword(\
userPwd=self.getUserPassword(\
_("Domain password for the desktop"))
pathRemote = "/var/calculate/remote"
pwdRemote = userPwd

Loading…
Cancel
Save