summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>2001-07-17 21:44:13 +0000
committerMike Fulbright <msf@redhat.com>2001-07-17 21:44:13 +0000
commitaa0e32c0c7c007546b0c983d7791c14855c42c07 (patch)
treed1a6a934859b8fea8efe77e6850cde4589657932 /anaconda
parent583ac377d13db757cc0cfd8533e5e73d46a0f9c8 (diff)
downloadanaconda-aa0e32c0c7c007546b0c983d7791c14855c42c07.tar.gz
anaconda-aa0e32c0c7c007546b0c983d7791c14855c42c07.tar.xz
anaconda-aa0e32c0c7c007546b0c983d7791c14855c42c07.zip
fixes to make fb X work as well as handle unprobed video cards gracefully
Diffstat (limited to 'anaconda')
-rwxr-xr-xanaconda26
1 files changed, 21 insertions, 5 deletions
diff --git a/anaconda b/anaconda
index bcc8099eb..15dd691c3 100755
--- a/anaconda
+++ b/anaconda
@@ -364,11 +364,17 @@ mousehw = mouse.Mouse(skipProbe = 1)
# skip probing if we have really sensitive hw that HAS to use text mode
if 1:
sys.stdout.write( _("Probing for video card: "))
+ fbdev = None
videohw = videocard.VideoCardInfo()
+
if videohw and videohw.primaryCard():
sys.stdout.write(videohw.primaryCard().shortDescription()+'\n')
+ fbdev = videohw.primaryCard().getDevice()
+ else:
+ sys.stdout.write(_("Unable to probe\n"))
+
sys.stdout.write( _("Probing for monitor type: "))
- monitorhw = monitor.MonitorInfo()
+ monitorhw = monitor.MonitorInfo(fbDevice=fbdev)
sys.stdout.write(monitorhw.shortDescription()+'\n')
# only probe if we're installing a real box or
@@ -396,6 +402,14 @@ if (method and ((len (method) >= 6 and method[:6] == "ftp://")
display_mode = 't'
time.sleep(2)
+# if no mouse we force text mode
+mousedev = mousehw.get()
+if mousedev[0] == "None - None":
+ print _("No mouse was detected. A mouse is required for graphical "
+ "installation. Starting text mode.")
+ display_mode = 't'
+ time.sleep(2)
+
#
# startup X server is we're not already running under an X session
#
@@ -412,16 +426,17 @@ if display_mode == 'g':
else:
xcfg = xserver.startX (runres, nofbmode, videohw, monitorhw,
mousehw)
-
except RuntimeError:
print " X startup failed, falling back to text mode"
display_mode = 't'
time.sleep(2)
else:
- xcfg = xf86config.XF86Config(videohw, monitorhw, mousehw, runres)
+ xcfg = xf86config.XF86Config(videohw.primaryCard(),
+ monitorhw, mousehw, runres)
else:
import xf86config
- xcfg = xf86config.XF86Config(videohw, monitorhw, mousehw, runres)
+ xcfg = xf86config.XF86Config(videohw.primaryCard(),
+ monitorhw, mousehw, runres)
import configFileData
configFile = configFileData.configFileData()
@@ -489,7 +504,8 @@ if xmode:
if display_mode == "t":
intf = InstallInterface ()
else:
- intf = InstallInterface (runres, nofbmode)
+ # determine the mode we actually ended up in
+ intf = InstallInterface ()
# imports after setting up the path
if method: