Add --live param for cl-image.

master
Mike Hiretsky 13 years ago
parent 67330829eb
commit 812b6ff2ba

@ -786,3 +786,12 @@ class cl_builder(color_print):
self.printERROR(_("'{0}' is not supported by {1}")\
.format(compress,"squashfs"))
return False
def setLive(self,live):
"""Set variable for activate patch init.d/calculate:
discard --live from cl-install --startup"""
if live:
self.clVars.Set('cl_builder_live_set',"on",True)
else:
self.clVars.Set('cl_builder_live_set',"off",True)

@ -58,6 +58,9 @@ CMD_OPTIONS = [{'shortOption':"p",
{'longOption':'notree',
'help':_("exclude portage tree from image")
},
{'longOption':'live',
'help':_("use only live templates on startup")
},
{'longOption':'noisohybrid',
'help':_("create iso image without isohybrid")
},
@ -146,6 +149,8 @@ class image_cmd(share_cmd):
if not self.logicObj.setCompression(values.compress):
sys.exit(1)
self.logicObj.setLive(values.live)
if not self.isScratch(False) \
and self.logicObj.clVars.Get('cl_builder_distro'):
if not self.logicObj.setAssembleData(values.p,values.v):

@ -153,6 +153,7 @@ class Data:
# path which contains images
cl_builder_image_path = {}
cl_builder_live_set = {}
# lib vars
cl_chroot_path = {}
cl_env_path = {}

Loading…
Cancel
Save