diff options
author | Gui Chen <gui.chen@intel.com> | 2012-01-16 11:14:35 +0800 |
---|---|---|
committer | JF Ding <jian-feng.ding@intel.com> | 2012-01-16 13:40:19 +0800 |
commit | aec417a99f7e5705ed006bdaa4229c1a9099a94f (patch) | |
tree | 2ecbe9203a7d3000fbf01e4499ccd932ea775cf1 /tools | |
parent | 6af2955e9728891aa97b7ca5ed38a59d5678866a (diff) | |
download | mic-aec417a99f7e5705ed006bdaa4229c1a9099a94f.tar.gz mic-aec417a99f7e5705ed006bdaa4229c1a9099a94f.tar.bz2 mic-aec417a99f7e5705ed006bdaa4229c1a9099a94f.zip |
add shell option for convertor to enable modification before conerting
recreate image modified by internal shell
Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-x | tools/mic | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -18,6 +18,7 @@ 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 @@ -82,6 +83,9 @@ class MicCmd(cmdln.Cmdln): 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 @@ -110,6 +114,8 @@ class MicCmd(cmdln.Cmdln): self._root_confirm() + configmgr.convert['shell'] = opts.shell + srcformat = misc.get_image_type(srcimg) if srcformat == "ext3fsimg": srcformat = "loop" |