|
|
@ -29,7 +29,8 @@ from calculate.lib.cl_template import (Template, ProgressTemplate,
|
|
|
|
TemplatesError,templateFunction,iniParser)
|
|
|
|
TemplatesError,templateFunction,iniParser)
|
|
|
|
from calculate.lib.utils.files import (runOsCommand, isMount,process,
|
|
|
|
from calculate.lib.utils.files import (runOsCommand, isMount,process,
|
|
|
|
getRunCommands,STDOUT,childMounts,getLoopFromPath,
|
|
|
|
getRunCommands,STDOUT,childMounts,getLoopFromPath,
|
|
|
|
getMdRaidDevices,listDirectory,removeDir)
|
|
|
|
getMdRaidDevices,listDirectory,removeDir,
|
|
|
|
|
|
|
|
makeDirectory)
|
|
|
|
from calculate.lib.utils.common import (getpathenv,appendProgramToEnvFile,
|
|
|
|
from calculate.lib.utils.common import (getpathenv,appendProgramToEnvFile,
|
|
|
|
removeProgramToEnvFile,mountEcryptfs,
|
|
|
|
removeProgramToEnvFile,mountEcryptfs,
|
|
|
|
CommonError, isBootstrapDataOnly)
|
|
|
|
CommonError, isBootstrapDataOnly)
|
|
|
@ -245,6 +246,23 @@ class Desktop:
|
|
|
|
return False
|
|
|
|
return False
|
|
|
|
return True
|
|
|
|
return True
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def setFastlogin(self, urLogin):
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
Отметить пользователя, что для него может быть
|
|
|
|
|
|
|
|
использовать "быстрой логин"
|
|
|
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
fastlogin = self.clVars.Get('cl_desktop_fastlogin_path')
|
|
|
|
|
|
|
|
if not path.exists(fastlogin):
|
|
|
|
|
|
|
|
makeDirectory(fastlogin)
|
|
|
|
|
|
|
|
fastlogin_user = path.join(fastlogin, urLogin)
|
|
|
|
|
|
|
|
if not path.exists(fastlogin_user):
|
|
|
|
|
|
|
|
try:
|
|
|
|
|
|
|
|
open(fastlogin_user,'w').close()
|
|
|
|
|
|
|
|
return True
|
|
|
|
|
|
|
|
except:
|
|
|
|
|
|
|
|
self.printWARNING(_("Failed to create the fastlogin mark file"))
|
|
|
|
|
|
|
|
return False
|
|
|
|
|
|
|
|
|
|
|
|
def userLogout(self, urLogin):
|
|
|
|
def userLogout(self, urLogin):
|
|
|
|
"""
|
|
|
|
"""
|
|
|
|
Выполнить logout пользователя через dbus
|
|
|
|
Выполнить logout пользователя через dbus
|
|
|
|