summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGui Chen <gui.chen@intel.com>2012-01-17 14:00:28 +0800
committerGui Chen <gui.chen@intel.com>2012-01-17 14:06:37 +0800
commit81780e923e45357a6090d9002b5112ce817b91d2 (patch)
treeb4255a0a49e5e4a61b5d5876bf96854f83e0c1ed /tools
parentaec417a99f7e5705ed006bdaa4229c1a9099a94f (diff)
downloadmic-81780e923e45357a6090d9002b5112ce817b91d2.tar.gz
mic-81780e923e45357a6090d9002b5112ce817b91d2.tar.bz2
mic-81780e923e45357a6090d9002b5112ce817b91d2.zip
mic chroot -s dest, unpack image and save to fs image
Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/mic5
1 files changed, 5 insertions, 0 deletions
diff --git a/tools/mic b/tools/mic
index c55c5f1..87c0558 100755
--- a/tools/mic
+++ b/tools/mic
@@ -136,6 +136,9 @@ class MicCmd(cmdln.Cmdln):
destimager.do_pack(base_on)
@cmdln.alias("ch")
+ @cmdln.option('-s', '--saveto',
+ action='store', dest='saveto', default=None,
+ help="Save the unpacked image to specified dir")
def do_chroot(self, subcmd, opts, *args):
"""${cmd_name}: chroot into an image
@@ -163,6 +166,8 @@ class MicCmd(cmdln.Cmdln):
self._root_confirm()
+ configmgr.chroot['saveto'] = opts.saveto
+
imagetype = misc.get_image_type(targetimage)
if imagetype in ("ext3fsimg", "ext4fsimg", "btrfsimg"):
imagetype = "loop"