call copy_attachment() after configure() and move attachment files
[tools/mic.git] / plugins / imager / raw_plugin.py
index 09a9714..ef537a4 100755 (executable)
@@ -16,6 +16,7 @@
 # Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
 import os
+import subprocess
 import shutil
 import re
 import tempfile
@@ -100,6 +101,7 @@ class RawPlugin(ImagerPlugin):
             creator.install()
             creator.configure(creatoropts["repomd"])
             creator.copy_kernel()
+            creator.copy_attachment()
             creator.unmount()
             creator.generate_bmap()
             creator.package(creatoropts["destdir"])
@@ -113,6 +115,15 @@ class RawPlugin(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