diff options
author | Jeremy Katz <katzj@redhat.com> | 2005-11-09 02:07:56 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2005-11-09 02:07:56 +0000 |
commit | 11794efabe0707a40d7cb46ff237e41a88db2b1a (patch) | |
tree | e3083b534d447605ccf82182505da694e1c41c02 /text.py | |
parent | 3b5fd8479a66de0add994334c859c353748be4ee (diff) | |
download | anaconda-11794efabe0707a40d7cb46ff237e41a88db2b1a.tar.gz anaconda-11794efabe0707a40d7cb46ff237e41a88db2b1a.tar.xz anaconda-11794efabe0707a40d7cb46ff237e41a88db2b1a.zip |
2005-11-08 Jeremy Katz <katzj@redhat.com>
* text.py (InstallInterface.isRealConsole): Add method to check if
we're on a "real" console instead of duplicating the code
everywhere. Add a check for /proc/xen to imply xen guest (not
real console)
(InstallInterface.run): Use new method.
(InstallInterface.run): Use new method.
* textw/language_text.py (LanguageWindow.__call__): Use new method.
Diffstat (limited to 'text.py')
-rw-r--r-- | text.py | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -433,13 +433,25 @@ class InstallInterface: if self.screen: self.screen.finish() + def isRealConsole(self): + """Returns True if this is a _real_ console that can do things, False + for non-real consoles such as serial, i/p virtual consoles or xen.""" + if flags.serial or flags.virtpconsole: + return False + if isys.isPsudoTTY(0): + return False + if isys.isVioConsole(): + return False + if os.path.exists("/proc/xen"): # this keys us that we're a xen guest + return False + return True + def run(self, id, dispatch): # set up for CJK text mode if needed oldlang = None if (flags.setupFilesystems and (id.instLanguage.getFontFile(id.instLanguage.getCurrent()) == "bterm") - and not flags.serial and not flags.virtpconsole - and not isys.isPsudoTTY(0) and not isys.isVioConsole()): + and self.isRealConsole()): log.info("starting bterm") rc = 1 try: @@ -472,7 +484,7 @@ class InstallInterface: if DEBUG or flags.test: self.screen.suspendCallback(debugSelf, self.screen) - if flags.serial or flags.virtpconsole or isys.isPsudoTTY(0) or isys.isVioConsole(): + if not self.isRealConsole(): self.screen.suspendCallback(spawnShell, self.screen) # clear out the old root text by writing spaces in the blank |