summaryrefslogtreecommitdiffstats
path: root/xserver.py
diff options
context:
space:
mode:
authorbfox <bfox>2001-01-19 20:00:53 +0000
committerbfox <bfox>2001-01-19 20:00:53 +0000
commit0bf0abef4844e4572ce2f760a713451b4420af0d (patch)
tree70d9ecaf08f9c6321d79aeaa837e1be57d3d25dc /xserver.py
parent5df440c7ac8081feb8371be88d0ba8767b26a967 (diff)
downloadanaconda-0bf0abef4844e4572ce2f760a713451b4420af0d.tar.gz
anaconda-0bf0abef4844e4572ce2f760a713451b4420af0d.tar.xz
anaconda-0bf0abef4844e4572ce2f760a713451b4420af0d.zip
Added code to drop to text mode if card can't be probed.
Diffstat (limited to 'xserver.py')
-rw-r--r--xserver.py26
1 files changed, 21 insertions, 5 deletions
diff --git a/xserver.py b/xserver.py
index c748341ab..5ebd33da8 100644
--- a/xserver.py
+++ b/xserver.py
@@ -78,13 +78,17 @@ def startX(resolution):
else:
(Xtype, Xtmp) = mouse.get()
print "Found a", Xtype
- time.sleep(2)
+# time.sleep(2)
x = XF86Config (mouse, resolution)
x.res = resolution
x.probe ()
-# print "Probed X server is " , x.server
+ print "Probed X server is " , x.server
+
+# import time
+# time.sleep(4)
+
probedServer = x.server
#--Run fb_check() and see if framebuffer works on this card
@@ -123,6 +127,11 @@ def startX(resolution):
x.server = probedServer
+ if not x.server:
+ print "Unknown card"
+ raise RuntimeError, "Unable to start X for unknown card"
+
+
# if this fails, we want the exception to go back to anaconda to
# it knows that this didn't work
testx(mouse, x)
@@ -148,7 +157,7 @@ def fb_check ():
return 0
def testx(mouse, x):
- print "going to test the x server"
+# print "going to test the x server"
try:
server = x.test ([':1', 'vt7', '-s', '1440', '-terminate'], spawn=1)
except:
@@ -158,14 +167,21 @@ def testx(mouse, x):
list = traceback.format_exception (type, value, tb)
text = joinfields (list, "")
print text
- print "tested the x server"
+# print "tested the x server"
# give time for the server to fail (if it is going to fail...)
# FIXME: Should find out if X server is already running
# otherwise with NFS installs the X server may be still being
# fetched from the network while we already continue to run
- time.sleep (4)
+# print "in testx, server is |%s| " %server
+# time.sleep (4)
+
+ if not server:
+ sys.stderr.write("X SERVER FAILED");
+ raise RuntimeError, "X server failed to start"
+
+
count = 0
sys.stdout.write("Waiting for X server to start")