|
|
|
@ -165,6 +165,12 @@ class cl_client(imp_cl_err, imp_cl_xml, imp_cl_help, imp_cl_smcon):
|
|
|
|
|
'help':_("control whether color is used to distinguish file types. \
|
|
|
|
|
WHEN may be 'never', 'always', or 'auto'")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(1,),
|
|
|
|
|
'shortOption':"f",
|
|
|
|
|
'longOption':"force",
|
|
|
|
|
'helpChapter':_("Common options"),
|
|
|
|
|
'help':_("always join the user profiles and preferences")
|
|
|
|
|
},
|
|
|
|
|
{'progAccess':(0,),
|
|
|
|
|
'longOption':"mount",
|
|
|
|
|
'helpChapter':_("Common options"),
|
|
|
|
@ -447,7 +453,7 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
alwProfilePath.append(prPath)
|
|
|
|
|
return alwProfilePath
|
|
|
|
|
|
|
|
|
|
def createHome(self, userName):
|
|
|
|
|
def createHome(self, userName, applyAlways=False):
|
|
|
|
|
"""Создание пользовательской директории с настройками для kde4"""
|
|
|
|
|
# Создаем объект переменных
|
|
|
|
|
self.createClVars()
|
|
|
|
@ -480,14 +486,15 @@ conjunction with the 'login' or 'logout'")
|
|
|
|
|
if homeExists:
|
|
|
|
|
self.printWARNING(_("Home dir %s exists")%homeDir)
|
|
|
|
|
if set(os.listdir(homeDir))-set(["Home","Disks"]):
|
|
|
|
|
# Получаем пути к профилям постоянного наложения
|
|
|
|
|
alwProfilePath = self.getAlwaysProfilePath()
|
|
|
|
|
if not alwProfilePath:
|
|
|
|
|
return True
|
|
|
|
|
# Записываем пути к профилям постоянного наложения
|
|
|
|
|
#в переменную
|
|
|
|
|
self.printSUCCESS(_("Apply always profiles") + " ...")
|
|
|
|
|
self.clVars.Set('cl_profile_path',alwProfilePath, True)
|
|
|
|
|
if not applyAlways:
|
|
|
|
|
# Получаем пути к профилям постоянного наложения
|
|
|
|
|
alwProfilePath = self.getAlwaysProfilePath()
|
|
|
|
|
if not alwProfilePath:
|
|
|
|
|
return True
|
|
|
|
|
# Записываем пути к профилям постоянного наложения
|
|
|
|
|
#в переменную
|
|
|
|
|
self.printSUCCESS(_("Apply always profiles") + " ...")
|
|
|
|
|
self.clVars.Set('cl_profile_path',alwProfilePath, True)
|
|
|
|
|
|
|
|
|
|
if not os.path.exists(homeDir):
|
|
|
|
|
self.createUserDir(uid, gid, homeDir)
|
|
|
|
|