From 18ae4d71b2e0d3b2279e8f8307d10f90f5e91a76 Mon Sep 17 00:00:00 2001 From: asamoukin Date: Wed, 1 Oct 2008 11:26:55 +0000 Subject: [PATCH] git-svn-id: http://svn.calculate.ru/calculate2/calculate-lib/trunk@212 c91db197-33c1-4113-bf15-f8a5c547ca64 --- pym/cl_base.py | 7 +++++++ pym/cl_profile.py | 14 +++++++++----- 2 files changed, 16 insertions(+), 5 deletions(-) diff --git a/pym/cl_base.py b/pym/cl_base.py index 3e55f79..5d40667 100644 --- a/pym/cl_base.py +++ b/pym/cl_base.py @@ -916,6 +916,13 @@ http://distro.ibiblio.org/pub/linux/distributions/gentoo" 'soft_ldap_admin_mailpw', 'soft_ldap_admin_mailpw_hash') + #Cервис Jabber + self.__fillServiceDN('Jabber', + 'soft_ldap_admin_jabber_name', + 'soft_ldap_admin_jabber', + 'soft_ldap_admin_jabberpw', + 'soft_ldap_admin_jabberpw_hash') + def __fillServiceDN(self, dnName, varName, varDN, varPwd, varPwdHash): diff --git a/pym/cl_profile.py b/pym/cl_profile.py index 9963f26..c72cef7 100644 --- a/pym/cl_profile.py +++ b/pym/cl_profile.py @@ -1843,7 +1843,7 @@ class profile(_file, _terms): self._reTermBloc = re.compile("#\?(?P[a-zA-Z0-9\-_]+)\ (?P[\>\<\=\!\&\|]+\ [a-zA-Z0-9\>\<\=\!\|\&\-_\.]+)#\ -\n*(?P.+?)\n*#(?P=rTerm)#(?P\s*)",re.M|re.S) +\n*(?P.+?)\n*#(?P=rTerm)#(?P[ ,\t]*\n?)",re.M|re.S) # Объект с переменными self.objVar = objVar # Базовая директория переноса профилей "/mnt/calculate" или "/" и.т.д @@ -1978,6 +1978,9 @@ class profile(_file, _terms): dirsProfiles = tmpDirsProfiles dirObjs = self.scanDirs(dirsProfiles) for dirObj in dirObjs: + # сортируем файлы по названию + if dirObj.files: + dirObj.files.sort() for dirProfile in dirObj.dirs: self.createDir(dirObj.baseDir, dirProfile, self._baseDir) for fileProfile in dirObj.files: @@ -2003,6 +2006,7 @@ class profile(_file, _terms): return True def __getApplyHeadProfile(self ,newFile, oldFile): + """Применяет заголовок к профилю (права, владелец, и.т. д)""" self.closeFiles() if not self.newProfile: self.nameFileNew = self.absFileName(newFile) @@ -2038,8 +2042,8 @@ class profile(_file, _terms): FON.write(buff) FON.close() - # chmod - если файла нет изменяем права - if objHeadNew.params.has_key("chmod") and not oldFileExists: + # chmod - изменяем права + if objHeadNew.params.has_key("chmod"): mode = self.__octToInt(objHeadNew.params['chmod']) if mode: if not os.path.exists(oldFile): @@ -2051,8 +2055,8 @@ class profile(_file, _terms): newFile) return False - # chown - если файла нет изменяем владельца и группу - if objHeadNew.params.has_key("chown") and not oldFileExists: + # chown - изменяем владельца и группу + if objHeadNew.params.has_key("chown"): owner = objHeadNew.params['chown'] if owner: if ":" in owner: