diff options
Diffstat (limited to 'plugins/imager/loop_plugin.py')
-rwxr-xr-x[-rw-r--r--] | plugins/imager/loop_plugin.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/plugins/imager/loop_plugin.py b/plugins/imager/loop_plugin.py index 1830230..0b94f0e 100644..100755 --- a/plugins/imager/loop_plugin.py +++ b/plugins/imager/loop_plugin.py @@ -16,11 +16,12 @@ # Temple Place - Suite 330, Boston, MA 02111-1307, USA. import os +import subprocess import shutil import tempfile from mic import chroot, msger, rt_util -from mic.utils import misc, fs_related, errors +from mic.utils import misc, fs_related, errors, runner from mic.conf import configmgr from mic.plugin import pluginmgr from mic.imager.loop import LoopImageCreator, load_mountpoints @@ -100,9 +101,12 @@ class LoopPlugin(ImagerPlugin): creator.check_depend_tools() creator.mount(None, creatoropts["cachedir"]) creator.install() + creator.tpkinstall() creator.configure(creatoropts["repomd"]) creator.copy_kernel() + creator.create_cpio_image() creator.unmount() + creator.copy_cpio_image() creator.package(creatoropts["destdir"]) creator.create_manifest() @@ -117,6 +121,14 @@ class LoopPlugin(ImagerPlugin): finally: creator.cleanup() + #Run script of --run_script after image created + if creatoropts['run_script']: + cmd = creatoropts['run_script'] + try: + runner.show(cmd) + except OSError,err: + msger.warning(str(err)) + msger.info("Finished.") return 0 |