]> git.siccegge.de Git - forks/vmdebootstrap.git/blobdiff - vmdebootstrap
Log messages
[forks/vmdebootstrap.git] / vmdebootstrap
index 93bb2c6bce46b44760450e181cb79d84c16296da..36a8998ee869788860de180cf22d987e340fb4f4 100755 (executable)
@@ -1,5 +1,6 @@
 #!/usr/bin/python
-# Copyright 2011  Lars Wirzenius
+# Copyright 2011, 2012  Lars Wirzenius
+# Copyright 2012  Codethink Limited
 # 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -107,6 +108,7 @@ class VmDebootstrap(cliapp.Application):
             self.cleanup_system()
 
     def message(self, msg):
+        logging.info(msg)
         if self.settings['verbose']:
             print msg
 
@@ -353,7 +355,8 @@ append initrd=%(initrd)s root=UUID=%(uuid)s ro quiet %(kserial)s
         script = self.settings['customize']
         if script:
             self.message('Running customize script %s' % script)
-            self.runcmd([script, rootdir])
+            with open('/dev/tty', 'w') as tty:
+                cliapp.runcmd([script, rootdir], stdout=tty, stderr=tty)
 
 
 if __name__ == '__main__':