diff options
author | Gui Chen <gui.chen@intel.com> | 2012-09-10 19:14:03 +0800 |
---|---|---|
committer | Gui Chen <gui.chen@intel.com> | 2012-09-12 16:55:03 +0800 |
commit | daf500e5703366da2e77d705ac18e3a0f9a1549b (patch) | |
tree | ed0202638b7f45d383fd0c619d1d307ee37f9ad7 /plugins | |
parent | 88d598c6d225b084a53b6dcd0b20a0a8e2af32b2 (diff) | |
download | mic-daf500e5703366da2e77d705ac18e3a0f9a1549b.tar.gz mic-daf500e5703366da2e77d705ac18e3a0f9a1549b.tar.bz2 mic-daf500e5703366da2e77d705ac18e3a0f9a1549b.zip |
fix help command incorrect issue
Signed-off-by: Gui Chen <gui.chen@intel.com>
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/imager/fs_plugin.py | 9 | ||||
-rw-r--r-- | plugins/imager/livecd_plugin.py | 9 | ||||
-rw-r--r-- | plugins/imager/liveusb_plugin.py | 9 | ||||
-rw-r--r-- | plugins/imager/loop_plugin.py | 9 | ||||
-rw-r--r-- | plugins/imager/raw_plugin.py | 9 |
5 files changed, 40 insertions, 5 deletions
diff --git a/plugins/imager/fs_plugin.py b/plugins/imager/fs_plugin.py index 7944b60..e2ee82b 100644 --- a/plugins/imager/fs_plugin.py +++ b/plugins/imager/fs_plugin.py @@ -18,7 +18,7 @@ import os import sys -from mic import chroot, msger +from mic import chroot, msger, rt_util from mic.utils import cmdln, misc, errors, fs_related from mic.imager import fs from mic.conf import configmgr @@ -43,9 +43,16 @@ class FsPlugin(ImagerPlugin): ${cmd_option_list} """ + if len(args) != 1: + raise errors.Usage("Extra arguments given") + creatoropts = configmgr.create ksconf = args[0] + if configmgr.bootstrap['enable']: + configmgr._ksconf = ksconf + rt_util.bootstrap_mic() + recording_pkgs = [] if len(creatoropts['record_pkgs']) > 0: recording_pkgs = creatoropts['record_pkgs'] diff --git a/plugins/imager/livecd_plugin.py b/plugins/imager/livecd_plugin.py index fbd7fb5..275f5c1 100644 --- a/plugins/imager/livecd_plugin.py +++ b/plugins/imager/livecd_plugin.py @@ -19,7 +19,7 @@ import os import shutil import tempfile -from mic import chroot, msger +from mic import chroot, msger, rt_util from mic.utils import misc, fs_related, errors from mic.conf import configmgr import mic.imager.livecd as livecd @@ -39,9 +39,16 @@ class LiveCDPlugin(ImagerPlugin): ${cmd_option_list} """ + if len(args) != 1: + raise errors.Usage("Extra arguments given") + creatoropts = configmgr.create ksconf = args[0] + if configmgr.bootstrap['enable']: + configmgr._ksconf = ksconf + rt_util.bootstrap_mic() + if creatoropts['arch'] and creatoropts['arch'].startswith('arm'): msger.warning('livecd cannot support arm images, Quit') return diff --git a/plugins/imager/liveusb_plugin.py b/plugins/imager/liveusb_plugin.py index 2ea93e5..02cfb45 100644 --- a/plugins/imager/liveusb_plugin.py +++ b/plugins/imager/liveusb_plugin.py @@ -19,7 +19,7 @@ import os import shutil import tempfile -from mic import chroot, msger +from mic import chroot, msger, rt_util from mic.utils import misc, fs_related, errors from mic.utils.partitionedfs import PartitionedMount from mic.conf import configmgr @@ -41,9 +41,16 @@ class LiveUSBPlugin(ImagerPlugin): ${cmd_option_list} """ + if len(args) != 1: + raise errors.Usage("Extra arguments given") + creatoropts = configmgr.create ksconf = args[0] + if configmgr.bootstrap['enable']: + configmgr._ksconf = ksconf + rt_util.bootstrap_mic() + if creatoropts['arch'] and creatoropts['arch'].startswith('arm'): msger.warning('liveusb cannot support arm images, Quit') return diff --git a/plugins/imager/loop_plugin.py b/plugins/imager/loop_plugin.py index f0d170f..c1bccba 100644 --- a/plugins/imager/loop_plugin.py +++ b/plugins/imager/loop_plugin.py @@ -19,7 +19,7 @@ import os import shutil import tempfile -from mic import chroot, msger +from mic import chroot, msger, rt_util from mic.utils import misc, fs_related, errors, cmdln from mic.conf import configmgr from mic.plugin import pluginmgr @@ -48,9 +48,16 @@ class LoopPlugin(ImagerPlugin): ${cmd_option_list} """ + if len(args) != 1: + raise errors.Usage("Extra arguments given") + creatoropts = configmgr.create ksconf = args[0] + if configmgr.bootstrap['enable']: + configmgr._ksconf = ksconf + rt_util.bootstrap_mic() + recording_pkgs = [] if len(creatoropts['record_pkgs']) > 0: recording_pkgs = creatoropts['record_pkgs'] diff --git a/plugins/imager/raw_plugin.py b/plugins/imager/raw_plugin.py index f310fac..3cb15ed 100644 --- a/plugins/imager/raw_plugin.py +++ b/plugins/imager/raw_plugin.py @@ -20,7 +20,7 @@ import shutil import re import tempfile -from mic import chroot, msger +from mic import chroot, msger, rt_util from mic.utils import misc, fs_related, errors, runner, cmdln from mic.conf import configmgr from mic.plugin import pluginmgr @@ -48,9 +48,16 @@ class RawPlugin(ImagerPlugin): ${cmd_option_list} """ + if len(args) != 1: + raise errors.Usage("Extra arguments given") + creatoropts = configmgr.create ksconf = args[0] + if configmgr.bootstrap['enable']: + configmgr._ksconf = ksconf + rt_util.bootstrap_mic() + recording_pkgs = [] if len(creatoropts['record_pkgs']) > 0: recording_pkgs = creatoropts['record_pkgs'] |