diff options
Diffstat (limited to 'plugins/imager/fs_plugin.py')
-rwxr-xr-x[-rw-r--r--] | plugins/imager/fs_plugin.py | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/plugins/imager/fs_plugin.py b/plugins/imager/fs_plugin.py index d74530f..c639211 100644..100755 --- a/plugins/imager/fs_plugin.py +++ b/plugins/imager/fs_plugin.py @@ -15,8 +15,9 @@ # with this program; if not, write to the Free Software Foundation, Inc., 59 # Temple Place - Suite 330, Boston, MA 02111-1307, USA. +import subprocess from mic import chroot, msger, rt_util -from mic.utils import misc, errors, fs_related +from mic.utils import misc, errors, fs_related, runner from mic.imager import fs from mic.conf import configmgr from mic.plugin import pluginmgr @@ -92,10 +93,10 @@ class FsPlugin(ImagerPlugin): creator.check_depend_tools() creator.mount(None, creatoropts["cachedir"]) creator.install() + creator.tpkinstall() #Download the source packages ###private options if args.include_src: installed_pkgs = creator.get_installed_packages() - msger.info('--------------------------------------------------') msger.info('Generating the image with source rpms included ...') if not misc.SrcpkgsDownload(installed_pkgs, creatoropts["repomd"], creator._instroot, creatoropts["cachedir"]): @@ -115,6 +116,15 @@ class FsPlugin(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 |