|
|
|
@ -20,8 +20,8 @@ import os
|
|
|
|
|
import re
|
|
|
|
|
import math
|
|
|
|
|
from os import path
|
|
|
|
|
from calculate.lib.utils.dracut import Dracut
|
|
|
|
|
from calculate.lib.utils.system import SystemPath
|
|
|
|
|
from .dracut import Dracut
|
|
|
|
|
from .system import SystemPath
|
|
|
|
|
import sys
|
|
|
|
|
import getpass
|
|
|
|
|
import string
|
|
|
|
@ -29,7 +29,7 @@ import glob
|
|
|
|
|
import pwd
|
|
|
|
|
import itertools
|
|
|
|
|
|
|
|
|
|
from calculate.lib.cl_lang import setLocalTranslate
|
|
|
|
|
from ..cl_lang import setLocalTranslate
|
|
|
|
|
|
|
|
|
|
_ = lambda x: x
|
|
|
|
|
setLocalTranslate('cl_lib3', sys.modules[__name__])
|
|
|
|
@ -441,7 +441,7 @@ def dict_by_columns(i, sep, key, value):
|
|
|
|
|
return dict(((x[key], x[value]) for x in (y.split(sep) for y in i) if len(x) >= max_val))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
from calculate.lib.utils.files import readLinesFile
|
|
|
|
|
from ..utils.files import readLinesFile
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def getUserGroups(userName, prefix="/"):
|
|
|
|
@ -499,8 +499,8 @@ def mountEcryptfs(userName, userPwd, userDir):
|
|
|
|
|
userPwd: пароль пользователя
|
|
|
|
|
userDir: домашний каталог пользователя
|
|
|
|
|
"""
|
|
|
|
|
from calculate.lib.utils.files import (process, readLinesFile, STDOUT)
|
|
|
|
|
from calculate.lib.utils.mount import isMount
|
|
|
|
|
from ..utils.files import (process, readLinesFile, STDOUT)
|
|
|
|
|
from ..utils.mount import isMount
|
|
|
|
|
|
|
|
|
|
if ".Private" in isMount(userDir):
|
|
|
|
|
return True
|
|
|
|
@ -558,7 +558,7 @@ def isBootstrapDataOnly(user_dir):
|
|
|
|
|
Каталог содержит только сертификат, созданный командой cl-core
|
|
|
|
|
а так же настроенные симлинки на .face, skel
|
|
|
|
|
"""
|
|
|
|
|
from calculate.lib.utils.files import find
|
|
|
|
|
from ..utils.files import find
|
|
|
|
|
max_diff = 10
|
|
|
|
|
skel_files = set([x for x in find('/etc/skel', onefilesystem=True,
|
|
|
|
|
fullpath=False)
|
|
|
|
@ -595,7 +595,7 @@ def get_fastlogin_domain_path(dv):
|
|
|
|
|
Получить пути до ресурсов для определения нужно ли выполнять
|
|
|
|
|
шаблоны для доменного профиля пользователя
|
|
|
|
|
"""
|
|
|
|
|
from calculate.lib.cl_template import LayeredIni
|
|
|
|
|
from ..cl_template import LayeredIni
|
|
|
|
|
overlay_suffix_path = 'profiles/templates'
|
|
|
|
|
template_paths = dv.Get('main.cl_template_path')
|
|
|
|
|
for template_path in template_paths:
|
|
|
|
|