@ -730,15 +730,6 @@ conjunction with the 'login' or 'logout'")
else :
return False
def getAlwaysProfilePath ( self ) :
""" Получаем пути к профилям которые применяются постоянно """
profilePath = self . clVars . Get ( ' cl_profile_path ' )
alwProfilePath = [ ]
for prPath in profilePath :
if os . path . split ( prPath ) [ 1 ] == " always " :
alwProfilePath . append ( prPath )
return alwProfilePath
def setDaemonAutostart ( self , daemon ) :
""" Прописывает демона в автозагрузку """
execStr = " rc-update add %s default " % daemon
@ -805,20 +796,17 @@ conjunction with the 'login' or 'logout'")
# Создаем пользовательскую директорию
self . clVars . Set ( ' cl_root_path ' , homeDir , True )
homeExists = os . path . exists ( homeDir )
# Первый проход
self . clVars . Set ( ' cl_pass_step ' , ' first ' , True )
if homeExists :
self . printWARNING ( _ ( " Home dir %s exists " ) % homeDir )
if set ( os . listdir ( homeDir ) ) - set ( self . skipHomeFile ) :
if not applyAlways :
# Получаем пути к профилям постоянного наложения
alwProfilePath = self . getAlwaysProfilePath ( )
if not alwProfilePath :
return True
# Записываем пути к профилям постоянного наложения
#в переменную
# Второй и последующие проходы
self . clVars . Set ( ' cl_pass_step ' , ' next ' , 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 )