summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2012-01-16 11:14:35 +0800
committerJF Ding <jian-feng.ding@intel.com>2012-01-16 13:40:19 +0800
commitaec417a99f7e5705ed006bdaa4229c1a9099a94f (patch)
tree2ecbe9203a7d3000fbf01e4499ccd932ea775cf1 /tools
parent6af2955e9728891aa97b7ca5ed38a59d5678866a (diff)
downloadmic-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-xtools/mic6
1 files changed, 6 insertions, 0 deletions
diff --git a/tools/mic b/tools/mic
index 1a08e85..c55c5f1 100755
--- a/tools/mic
+++ b/tools/mic
@@ -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"