"runtime": None,
},
'chroot': {},
- 'convert': {},
+ 'convert': {
+ "shell": False,
+ },
'bootstraps': {},
}
raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
convertoropts = configmgr.convert
+ convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]
convertor = livecd.LiveCDImageCreator(convertoropts)
- convertor.name = os.path.splitext(os.path.basename(base_on))[0]
imgtype = misc.get_image_type(base_on)
if imgtype == "btrfsimg":
fstype = "btrfs"
__mkinitrd(convertor)
convertor._create_bootconfig()
__run_post_cleanups(convertor)
+ convertor.launch_shell(convertoropts['shell'])
convertor.unmount()
convertor.package()
convertor.print_outimage_info()
raise errors.CreatorError("Failed to run post cleanups: %s" % msg)
convertoropts = configmgr.convert
+ convertoropts['name'] = os.path.splitext(os.path.basename(base_on))[0]
convertor = liveusb.LiveUSBImageCreator(convertoropts)
- convertor.name = os.path.splitext(os.path.basename(base_on))[0]
imgtype = misc.get_image_type(base_on)
if imgtype == "btrfsimg":
fstype = "btrfs"
__mkinitrd(convertor)
convertor._create_bootconfig()
__run_post_cleanups(convertor)
+ convertor.launch_shell(convertoropts['shell'])
convertor.unmount()
convertor.package()
convertor.print_outimage_info()
import os, sys, errno
from mic import msger, creator
from mic.utils import cmdln, misc, errors
+from mic.conf import configmgr
from mic.plugin import pluginmgr
from mic.__version__ import VERSION
msger.error('Root permission is required to continue, abort')
@cmdln.alias("cv")
+ @cmdln.option("-S", "--shell",
+ action="store_true", dest="shell", default=False,
+ help="Launch shell before packaging the converted image")
def do_convert(self, subcmd, opts, *args):
"""${cmd_name}: convert image format
self._root_confirm()
+ configmgr.convert['shell'] = opts.shell
+
srcformat = misc.get_image_type(srcimg)
if srcformat == "ext3fsimg":
srcformat = "loop"