Add write to env file. Fix compatibility with lib.

netsetup
Mike Hiretsky 14 years ago
parent bc5ac35d17
commit d6ff95dcca

@ -19,7 +19,7 @@ import re
from cl_datavars import glob_attr
class fillVars(object, glob_attr):
def get_cl_profile_path(self):
def get_cl_template_path(self):
"""list appied templates"""
profpath = []
profPaths=['/usr/lib/calculate-2.2/calculate-install/templates',

@ -74,8 +74,9 @@ class cl_install(color_print):
"""Apply templates for root of system."""
self.clVars.Set("cl_root_path","/", True)
self.clTemp = template(self.clVars)
dirsFiles = self.clTemp.applyProfiles()
dirsFiles = self.clTemp.applyTemplates()
if self.clTemp.getError():
self.printERROR(self.clTemp.getError())
return False
else:
return dirsFiles

@ -23,7 +23,7 @@
class Data:
# list of applied templates
cl_profile_path = {}
cl_template_path = {}
# relative path for apply templates on files of system
cl_root_path = {}

@ -70,7 +70,7 @@ Utility for installation and configuration of Calculate Linux"""),
for val in vals.split(','):
k,o,v = val.partition('=')
if self.clVars.exists(k):
if not self.clVars.Set(k,v):
if not self.clVars.SetWriteVar(k,v):
return False
else:
self.printERROR(_('variable %s not found')%k)
@ -110,7 +110,11 @@ Utility for installation and configuration of Calculate Linux"""),
self.processDisplayVars(options.vars)
return True
elif not options.T is None:
return self.applyTemplatesForSystem()
if self.applyTemplatesForSystem():
self.clVars.WriteVars()
return True
else:
return False
else:
return False

Loading…
Cancel
Save