|
|
|
@ -1829,16 +1829,24 @@ install/6intranet" %(domain,servDn,unixDN,bindDn,bindPw)
|
|
|
|
|
pathOldProfile = os.path.join(home, "." + userName)
|
|
|
|
|
if os.path.exists(pathOldProfile):
|
|
|
|
|
osLinuxShort = self.clVars.Get("os_linux_shortname")
|
|
|
|
|
skipDirs = [".CLD", ".CLDX"]
|
|
|
|
|
# В случае пустой директории профиля
|
|
|
|
|
if not os.listdir(pathOldProfile):
|
|
|
|
|
pathNewProfile = os.path.join(pathOldProfile,
|
|
|
|
|
"." + osLinuxShort)
|
|
|
|
|
# Создаем директорию для хранения профиля
|
|
|
|
|
os.mkdir(pathNewProfile)
|
|
|
|
|
os.chmod(pathNewProfile, 0700)
|
|
|
|
|
return True
|
|
|
|
|
skipDirs = [".CLD", ".CLDX", "." + osLinuxShort]
|
|
|
|
|
# Если есть скрытые файлы кроме skipDir
|
|
|
|
|
# а так-же нет файлов skipDir - делаем апгрейд
|
|
|
|
|
if filter(lambda x: x[0]==".",
|
|
|
|
|
list(set(os.listdir(pathOldProfile))-set(skipDirs))) and\
|
|
|
|
|
len(filter(lambda x: not os.path.exists(os.path.join(pathOldProfile,x)),
|
|
|
|
|
skipDirs))==2:
|
|
|
|
|
skipDirs))==len(skipDirs):
|
|
|
|
|
pathNewProfile = os.path.join(pathOldProfile,".CLD")
|
|
|
|
|
# Копируем профиль в новое место
|
|
|
|
|
patchNewProfile = os.path.join(pathOldProfile,".CLD")
|
|
|
|
|
self.copyProfileDir(patchNewProfile, pathOldProfile)
|
|
|
|
|
self.copyProfileDir(pathNewProfile, pathOldProfile)
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
def syncUser(self, userName, userHome, sync, uid, gid, progress=False,\
|
|
|
|
|