diff --git a/pym/cl_client.py b/pym/cl_client.py index ba59d77..5bca42e 100644 --- a/pym/cl_client.py +++ b/pym/cl_client.py @@ -28,7 +28,9 @@ import types import getpass import _cl_keys -Version = "calculate-client 2.0.11" +import time + +Version = "calculate-client 2.0.12" tr = cl_base.lang() tr.setLanguage(sys.modules[__name__]) @@ -231,6 +233,11 @@ conjunction with the 'login' or 'logout'") self.relGroupsDN = self.addDN(self.relGrDN, self.relDN) # Объект хранения переменных self.clVars = False + # Файл в ресурсе share для обработки подключения клиента + self.replRunFileShare = ".reprun" + # При включениии репликации + # Временные задержки для монтирования в секундах + self.sleeps = [0.5, 2, 5] def isRoot(self): """Определяет является ли пользователь root""" @@ -985,19 +992,20 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw) return False home = os.path.split(homeDir)[0] pathRemote = [] + # Удаленный ресурс share + pathRemote.append((os.path.join(homeDir,"Disks"), "share")) # Удаленный ресурс профилей pathRemote.append((os.path.join(home,"." + userName), "unix")) # Удаленный ресурс home pathRemote.append((os.path.join(homeDir,"Home"), "homes")) - # Удаленный ресурс share - pathRemote.append((os.path.join(homeDir,"Disks"), "share")) if self.clVars.Get("cl_remote_ftp"): # Удаленный ресурс ftp pathRemote.append((os.path.join(homeDir,"FTP"), "ftp")) flagError = False - i = 0 + flagSleep = False + # Флаг репликации + flagRepl = False for path, res in pathRemote: - i += 1 # Создаем директории для монтирования if not os.path.exists(path): try: @@ -1012,7 +1020,8 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw) # Проверяем на монтирование директории if self.isMount(path, 'cifs'): continue - if i>=3: + + if res in ['ftp','share']: # Монтируем директории c uid mountStr="mount -t cifs -o user=%s,password=%s,uid=%s,gid=%s"\ %(userName,userPwd,uid,gid) + " " +\ @@ -1027,10 +1036,55 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw) textLine = self.execProg(mountStr) if not (textLine == None): - self.printERROR(_("Can not mount Samba resource [%s]")%res + \ - " ...") - flagError = True - break + # В случае репликации + if flagSleep: + i == 0 + while (i