|
|
|
@ -570,12 +570,15 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
return foundMount
|
|
|
|
|
|
|
|
|
|
def mountRemote(self):
|
|
|
|
|
"""Монтирование remote и домашней директории если компьютер в домене"""
|
|
|
|
|
self.createClVars(self.clVars)
|
|
|
|
|
foundMount = self.isDomain()
|
|
|
|
|
if not foundMount:
|
|
|
|
|
domain = self.clVars.Get("cl_remote_host")
|
|
|
|
|
if domain:
|
|
|
|
|
foundMountRemote = self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome = self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
else:
|
|
|
|
|
self.printERROR("The computer is not in domain")
|
|
|
|
|
return False
|
|
|
|
|
foundMountRemote = foundMount[0]
|
|
|
|
|
foundMountHome = foundMount[1]
|
|
|
|
|
pathHome = "/var/calculate/home"
|
|
|
|
|
if foundMountRemote:
|
|
|
|
|
self.printWARNING(_("Samba resource [remote] is mount") + \
|
|
|
|
@ -588,11 +591,9 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
|
|
|
|
|
if not foundMountRemote:
|
|
|
|
|
pathRemote = "/var/calculate/remote"
|
|
|
|
|
domain = self.clVars.Get("cl_remote_host")
|
|
|
|
|
pwdRemote = self.clVars.Get("cl_remote_pw")
|
|
|
|
|
if not (domain and pwdRemote):
|
|
|
|
|
self.printERROR(_("Not found vaiables: cl_remote_host or \
|
|
|
|
|
cl_remote_pw") + " ...")
|
|
|
|
|
self.printERROR(_("Not found vaiable: cl_remote_pw") + " ...")
|
|
|
|
|
return False
|
|
|
|
|
if not os.path.exists(pathRemote):
|
|
|
|
|
os.makedirs(pathRemote)
|
|
|
|
@ -677,17 +678,24 @@ cl_remote_pw") + " ...")
|
|
|
|
|
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")
|
|
|
|
|
foundMountRemote =self.isMount("/var/calculate/remote" ,"cifs")
|
|
|
|
|
foundMountHome =self.isMount("/var/calculate/home" ,"none", False)
|
|
|
|
|
if foundMountRemote:
|
|
|
|
|
self.printWARNING(_("Samba resource [remote] mount") + \
|
|
|
|
|
" ...")
|
|
|
|
|
else:
|
|
|
|
|
userPwd = self.getUserPassword("Domain password for the desktop")
|
|
|
|
|
if pwd:
|
|
|
|
|
userPwd = pwd
|
|
|
|
|
else:
|
|
|
|
|
userPwd=self.getUserPassword("Domain password for the desktop")
|
|
|
|
|
pathRemote = "/var/calculate/remote"
|
|
|
|
|
pwdRemote = userPwd
|
|
|
|
|
if not os.path.exists(pathRemote):
|
|
|
|
|