[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [PYGRUB] Invoke pygrub with TERM=vt100



# HG changeset patch
# User Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
# Date 1170342217 0
# Node ID 1c7efb60176c3542fe06eeec84c230aab5e38bc2
# Parent  6e81102d29be5c688c0e77c9ef3303c677264e91
[PYGRUB] Invoke pygrub with TERM=vt100
Signed-off-by: Tim Deegan <Tim.Deegan@xxxxxxxxxxxxx>
---
 tools/pygrub/src/pygrub                 |    5 ++++-
 tools/python/xen/xend/XendBootloader.py |    4 +++-
 2 files changed, 7 insertions(+), 2 deletions(-)

diff -r 6e81102d29be -r 1c7efb60176c tools/pygrub/src/pygrub
--- a/tools/pygrub/src/pygrub   Thu Feb 01 13:15:03 2007 +0000
+++ b/tools/pygrub/src/pygrub   Thu Feb 01 15:03:37 2007 +0000
@@ -197,7 +197,10 @@ class Grub:
             self.screen = curses.initscr()
             self.screen.timeout(1000)
             if hasattr(curses, 'use_default_colors'):
-                curses.use_default_colors()
+                try:
+                    curses.use_default_colors()
+                except:
+                    pass # Not important if we can't use colour
             enable_cursor(False)
             self.entry_win = curses.newwin(10, 74, 2, 1)
             self.text_win = curses.newwin(10, 70, 12, 5)
diff -r 6e81102d29be -r 1c7efb60176c tools/python/xen/xend/XendBootloader.py
--- a/tools/python/xen/xend/XendBootloader.py   Thu Feb 01 13:15:03 2007 +0000
+++ b/tools/python/xen/xend/XendBootloader.py   Thu Feb 01 15:03:37 2007 +0000
@@ -97,7 +97,9 @@ def bootloader(blexec, disk, dom, quiet 
 
         try:
             log.debug("Launching bootloader as %s." % str(args))
-            os.execvp(args[0], args)
+            env = os.environ.copy()
+            env['TERM'] = 'vt100'
+            os.execvpe(args[0], args, env)
         except OSError, e:
             print e
             pass

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.