Изменена нумерация версий

git-svn-id: http://svn.calculate.ru/calculate2/calculate-client/trunk@917 c91db197-33c1-4113-bf15-f8a5c547ca64
develop
asamoukin 15 years ago
parent 3694c92714
commit 06620303d4

@ -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<len(self.sleeps) and not (textLine == None))
time.sleep(self.sleeps[i])
if res in ['ftp','share']:
# Монтируем директории c uid
mountStr=\
"mount -t cifs -o user=%s,password=%s,uid=%s,gid=%s"\
%(userName,userPwd,uid,gid) + " " +\
"//%s/%s %s" %(self.clVars.Get("cl_remote_host"),
res, path)
else:
# Монтируем директории
mountStr=\
"mount -t cifs -o user=%s,password=%s"\
%(userName,userPwd) + " " +\
"//%s/%s %s" %(self.clVars.Get("cl_remote_host"),
res, path)
textLine = self.execProg(mountStr)
if not (textLine == None):
# Проверяем на монтирование директории
if self.isMount(path, 'cifs'):
textLineUmount = self.execProg("umount %s"%path)
if not (textLineUmount == None):
self.printERROR(_("Can not umount Samba \
resource [%s]")%res + " ...")
flagError = True
break
else:
flagSleep = False
i += 1
if not (textLine == None):
if flagError:
break
self.printERROR(_("Can not mount Samba resource [%s]")\
%res + " ...")
flagError = True
break
# В случае репликации
if res == "share":
# Проверка на репликацию
pathReplRun = os.path.join(path, self.replRunFileShare)
if os.path.exists(pathReplRun):
FD = open(pathReplRun)
FD.close()
flagRepl = True
flagSleep = True
if flagError:
return False
# Синхронизируем настройки

@ -127,8 +127,11 @@ class Data:
#Сигнатура пользователя
ur_signature = {'mode':'w'}
# DN ветки репликации
ld_repl_dn = {}
# Calculate плюс версия калкулэйта для записи в заголовок файла
# объединяемого с профилем
#setup_name
cl_ver = {'value':'Calculate-client 2.0.11'}
cl_ver = {'value':'Calculate-client 2.0.12'}

@ -110,7 +110,7 @@ data_files += create_data_files (data_dirs_share, share_calculate_dir)
setup(
name = 'calculate-client',
version = "2.0.11",
version = "2.0.12",
description = "Client for the calculate-server",
author = "Calculate Pack",
author_email = "support@calculate.ru",

Loading…
Cancel
Save