summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xplugins/imager/fs_plugin.py6
-rwxr-xr-xplugins/imager/loop_plugin.py6
-rwxr-xr-xplugins/imager/qcow_plugin.py4
-rwxr-xr-xplugins/imager/raw_plugin.py4
4 files changed, 6 insertions, 14 deletions
diff --git a/plugins/imager/fs_plugin.py b/plugins/imager/fs_plugin.py
index a6b5cf8..b2701a0 100755
--- a/plugins/imager/fs_plugin.py
+++ b/plugins/imager/fs_plugin.py
@@ -17,7 +17,7 @@
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
@@ -118,10 +118,8 @@ class FsPlugin(ImagerPlugin):
#Run script of --run_script after image created
if creatoropts['run_script']:
cmd = creatoropts['run_script']
- msger.info("Running command in parameter run_script: "+"".join(cmd))
try:
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- p.communicate()
+ runner.show(cmd)
except OSError,err:
msger.warning(str(err))
diff --git a/plugins/imager/loop_plugin.py b/plugins/imager/loop_plugin.py
index c3fa67b..6034a29 100755
--- a/plugins/imager/loop_plugin.py
+++ b/plugins/imager/loop_plugin.py
@@ -21,7 +21,7 @@ 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
@@ -123,10 +123,8 @@ class LoopPlugin(ImagerPlugin):
#Run script of --run_script after image created
if creatoropts['run_script']:
cmd = creatoropts['run_script']
- msger.info("Running command in parameter run_script: "+"".join(cmd))
try:
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- p.communicate()
+ runner.show(cmd)
except OSError,err:
msger.warning(str(err))
diff --git a/plugins/imager/qcow_plugin.py b/plugins/imager/qcow_plugin.py
index 27a712b..a81e291 100755
--- a/plugins/imager/qcow_plugin.py
+++ b/plugins/imager/qcow_plugin.py
@@ -154,10 +154,8 @@ class QcowPlugin(ImagerPlugin):
#Run script of --run_script after image created
if creatoropts['run_script']:
cmd = creatoropts['run_script']
- msger.info("Running command in parameter run_script: "+"".join(cmd))
try:
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- p.communicate()
+ runner.show(cmd)
except OSError,err:
msger.warning(str(err))
diff --git a/plugins/imager/raw_plugin.py b/plugins/imager/raw_plugin.py
index 554eac7..1524e74 100755
--- a/plugins/imager/raw_plugin.py
+++ b/plugins/imager/raw_plugin.py
@@ -117,10 +117,8 @@ class RawPlugin(ImagerPlugin):
#Run script of --run_script after image created
if creatoropts['run_script']:
cmd = creatoropts['run_script']
- msger.info("Running command in parameter run_script: "+"".join(cmd))
try:
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
- p.communicate()
+ runner.show(cmd)
except OSError,err:
msger.warning(str(err))