Revert "Add --live option for cl-desktop."

This reverts commit ff2d91be9c.

Conflicts:

	pym/cl_desktop.py
	pym/cl_desktop_cmd.py
master3.3
Mike Hiretsky 13 years ago
parent 8723aa40fb
commit b3f7a7a2ec

@ -27,24 +27,16 @@ then
[[ -z "`ls ${userHome}`" ]] || [[ -z "`ls ${userHome}`" ]] ||
diff -uq <(ls -A1 /etc/skel | wc) <(ls -A1 ${userHome} | sort) &>/dev/null diff -uq <(ls -A1 /etc/skel | wc) <(ls -A1 ${userHome} | sort) &>/dev/null
then then
APPENDCMD="" ERRORLOG=`/usr/bin/cl-desktop --progress --color=never $USER 2>&1`
# run configure only mutable params of user profile if it is live system # raise xmessage error if cl-desktop failed
# and profile already configured if [ "$?" -gt "0" ];
elif [[ "`desktop_variable_value os_root_type`" != "hdd" ]] then
then # write error message to logfile
APPENDCMD="--live" echo "$ERRORLOG" >> $FILE_LOG
else # display error by xmessage
exit 0 xmes cl-desktop "$ERRORLOG"
fi exit 1
ERRORLOG=`/usr/bin/cl-desktop $APPENDCMD --progress --color=never $USER 2>&1` fi
# raise xmessage error if cl-desktop failed
if [ "$?" -gt "0" ];
then
# write error message to logfile
echo "$ERRORLOG" >> $FILE_LOG
# display error by xmessage
xmes cl-desktop "$ERRORLOG"
exit 1
fi fi
fi fi
exit 0 exit 0

@ -196,7 +196,7 @@ class desktop(share):
self.displayTemplatesApplied(dirsFiles) self.displayTemplatesApplied(dirsFiles)
return dirsFiles return dirsFiles
def createHome(self, progress=False, live=False, verbose=False): def createHome(self, progress=False, verbose=False):
"""Создание профиля пользователя (пользовательской директории)""" """Создание профиля пользователя (пользовательской директории)"""
# Имя пользователя # Имя пользователя
self.verbose = verbose self.verbose = verbose
@ -240,12 +240,8 @@ class desktop(share):
if not os.path.exists(homeDir): if not os.path.exists(homeDir):
flagHomeExists = False flagHomeExists = False
self.createUserDir(uid, gid, homeDir) self.createUserDir(uid, gid, homeDir)
# if live action then action update mutable params of profile (live) # Действие - шаблоны пользователя
# else action is update user profile self.clVars.Set("cl_action", "desktop", True)
if live:
self.clVars.Set("cl_action", "live", True)
else:
self.clVars.Set("cl_action", "desktop", True)
# Применяем профили для пользователя # Применяем профили для пользователя
dirsAndFiles = self.applyTemplatesFromUser(progress) dirsAndFiles = self.applyTemplatesFromUser(progress)
if not dirsAndFiles: if not dirsAndFiles:

@ -35,9 +35,7 @@ EXAMPLES = _("%prog user_name")
DESCRIPTION = _("Create home directory for the new user account") DESCRIPTION = _("Create home directory for the new user account")
# Опции командной строки # Опции командной строки
CMD_OPTIONS = [{'longOption':"live", CMD_OPTIONS = [{'longOption':"verbose",
'help':_("update only mutable parameters of user profile")},
{'longOption':"verbose",
'help':_("display the template is applied")}, 'help':_("display the template is applied")},
{'longOption':"set"}, {'longOption':"set"},
{'longOption':"install", {'longOption':"install",
@ -145,8 +143,7 @@ class desktop_cmd(share_cmd):
def createHome(self, optObj): def createHome(self, optObj):
"""Создание домашней директории""" """Создание домашней директории"""
return self.logicObj.createHome(optObj.progress,optObj.live, return self.logicObj.createHome(optObj.progress, optObj.verbose)
optObj.verbose)
def install(self): def install(self):
"""Инсталяция программы""" """Инсталяция программы"""

@ -34,9 +34,7 @@ class fillVars():
return "" return ""
def get_ac_desktop_install(self): def get_ac_desktop_install(self):
""" """переключатель для шаблонов инсталяции и удаления программы"""
Trigger for templates of package installation and uninstallation
"""
ret = "" ret = ""
action = self.Get("cl_action") action = self.Get("cl_action")
if action in ("install","merge"): if action in ("install","merge"):
@ -46,9 +44,7 @@ class fillVars():
return ret return ret
def get_ac_desktop_merge(self): def get_ac_desktop_merge(self):
""" """переключатель для шаблонов merge"""
Trigger for the merge templates
"""
ret = "" ret = ""
action = self.Get("cl_action") action = self.Get("cl_action")
if action in ("install","merge"): if action in ("install","merge"):
@ -56,25 +52,13 @@ class fillVars():
return ret return ret
def get_ac_desktop_desktop(self): def get_ac_desktop_desktop(self):
""" """переключатель для шаблонов создания пользовательского профиля"""
Trigger for templates of user profile creating
"""
ret = "" ret = ""
action = self.Get("cl_action") action = self.Get("cl_action")
if action in ("desktop",): if action in ("desktop",):
ret = "up" ret = "up"
return ret return ret
def get_ac_desktop_live(self):
"""
Trigger for templates update live configuration of profile
"""
ret = ""
action = self.Get("cl_action")
if action in ("desktop","live"):
ret = "up"
return ret
def get_ur_domain_set(self): def get_ur_domain_set(self):
'''доменный пользователь "on", "off"''' '''доменный пользователь "on", "off"'''
ret = "off" ret = "off"

@ -54,18 +54,15 @@ class Data:
# Host Jabber пользователя # Host Jabber пользователя
ur_jid_host = {'mode':"w"} ur_jid_host = {'mode':"w"}
# trigger for the merge templates # переключатель для шаблонов merge
ac_desktop_merge = {} ac_desktop_merge = {}
# trigger for templates of package installation and uninstallation # переключатель для шаблонов инсталяции и удаления программы
ac_desktop_install = {} ac_desktop_install = {}
# trigger for templates of user profile creating # переключатель для шаблонов создания пользовательского профиля
ac_desktop_desktop = {} ac_desktop_desktop = {}
# trigger for templates update live configuration of profile
ac_desktop_live = {}
# доменный пользователь "on", "off" # доменный пользователь "on", "off"
ur_domain_set = {} ur_domain_set = {}

Loading…
Cancel
Save