The attached vmdebootstrap patch should resolve Pere's concerns:

- We now attempt to run in interactive mode, however, if that fails, we
  fall back to non-interactive mode.

- Also, we now run everything inside a chroot to prevent poorly written
  customize scripts from breaking the host system.

This should make the customize action much more reliable and safe, all
around.

Thanks for your time,
Nick

--- a/vmdebootstrap	2014-05-11 13:16:27.948314432 -0500
+++ b/vmdebootstrap	2014-05-17 11:26:25.000000000 -0500
@@ -492,8 +493,12 @@
         script = self.settings['customize']
         if script:
             self.message('Running customize script %s' % script)
-            with open('/dev/tty', 'w') as tty:
-                cliapp.runcmd([script, rootdir], stdout=tty, stderr=tty)
+            try:
+                with open('/dev/tty', 'w') as tty:
+                    cliapp.runcmd(["chroot", script, rootdir],
+                                  stdout=tty, stderr=tty)
+            except IOError as e:
+                subprocess.call(["chroot", rootdir, script])
 
     def create_tarball(self, rootdir):
         # Create a tarball of the disk's contents

Reply via email to