diff --git a/pym/cl_fill.py b/pym/cl_fill.py index 31bbc61..1d5350b 100644 --- a/pym/cl_fill.py +++ b/pym/cl_fill.py @@ -730,3 +730,13 @@ class fillVars(varsShare): if path.exists(timezonefile): return open(timezonefile,"r").read().strip() return "UTC" + + def get_cl_autologin(self): + """For livecd get first local non-root user""" + if self.Get('os_root_type') == "livecd" or + self.Get('os_linux_shortname') == 'CMC': + nonRootUsers = filter(lambda x: x != "root", + self.Get('cl_migrate_user')) + if nonRootUsers: + return nonRootUsers[0] + return "" diff --git a/pym/cl_template.py b/pym/cl_template.py index dbf39cd..d7bb8f2 100644 --- a/pym/cl_template.py +++ b/pym/cl_template.py @@ -76,16 +76,16 @@ class _terms(_error, _shareTermsFunction): Split version. Version, addition letter, list suffixes with version, revision. Examples: - 2.2.22 - ("2.2.22","",[],"") - 2.2.22-r1 - ("2.2.22","",[],"r1") - 2.2.22a-r1 - ("2.2.22","a",[],"r1") - 2.2.22a_rc1-r1 - ("2.2.22","a",[("rc","1")],"r1") - 2.2.22a_rc1_p20111212-r1 - ("2.2.22","a",[("rc1","1"),("p","20111212")],"r1") + 2.2.23 + ("2.2.23","",[],"") + 2.2.23-r1 + ("2.2.23","",[],"r1") + 2.2.23a-r1 + ("2.2.23","a",[],"r1") + 2.2.23a_rc1-r1 + ("2.2.23","a",[("rc","1")],"r1") + 2.2.23a_rc1_p20111212-r1 + ("2.2.23","a",[("rc1","1"),("p","20111212")],"r1") """ # get revision from version strWorkVersion, spl, rVersion = strVersion.rpartition("-") diff --git a/pym/cl_vars.py b/pym/cl_vars.py index 0466cc5..9f65a74 100644 --- a/pym/cl_vars.py +++ b/pym/cl_vars.py @@ -88,6 +88,16 @@ class Data: # template file performed at now cl_pass_file = {'hide':True, 'mode':"w"} + """ + cl_autologin: + Available values: "" or username + If variable empty then system will not perform autologin + If variable value is username then dm perform autologin for this user + + Fill: for livecd this variable get first local user (non-root) + """ + cl_autologin = {'hide':True, 'mode':"w"} + # root partition of filesystem os_root_dev = {'hide':True} diff --git a/pym/update_config/cl_update_config.py b/pym/update_config/cl_update_config.py index 3e97dd4..8f308b9 100644 --- a/pym/update_config/cl_update_config.py +++ b/pym/update_config/cl_update_config.py @@ -14,7 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "2.2.22" +__version__ = "2.2.23" __app__ = "calculate-lib" import sys, os, stat, re diff --git a/setup.py b/setup.py index 7e9502a..9f0a2eb 100755 --- a/setup.py +++ b/setup.py @@ -22,7 +22,7 @@ from distutils.core import setup from distutils.command.build_scripts import build_scripts from distutils.command.install_scripts import install_scripts -__version__ = "2.2.22" +__version__ = "2.2.23" __app__ = "calculate-lib" class cl_build_scripts(build_scripts):