diff options
author | Jeremy Katz <katzj@redhat.com> | 2001-12-27 05:16:57 +0000 |
---|---|---|
committer | Jeremy Katz <katzj@redhat.com> | 2001-12-27 05:16:57 +0000 |
commit | 345813c57c3fd10b66b10a1b544f7bd0f3950a7a (patch) | |
tree | 30623a2937aeacb2fc8026ce206c053e375249a9 /anaconda | |
parent | 26223b23aeb01e4b428c12fa5881280a21eaaec0 (diff) | |
download | anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.gz anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.tar.xz anaconda-345813c57c3fd10b66b10a1b544f7bd0f3950a7a.zip |
whee! merge the first bunch of changes from the 390 branch. this
incorporates most of the python changes as well as the isys changes.
email with what hasn't been applied coming later after I either finish merging
the rest or decide to stop for the night
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 69 |
1 files changed, 47 insertions, 22 deletions
@@ -213,6 +213,8 @@ for n in args: display_mode = 't' elif (str == '-x' or str == '--xmode'): xmode = 1 + elif iutil.getArch() == "s390" or iutil.getArch() == "s390x": + logFile = "/tmp/anaconda-s390.log" # # must specify install, rescue or reconfig mode @@ -247,10 +249,11 @@ if (debug): import pdb pdb.set_trace() -# don't let folks do anything stupid -if (not flags.test and os.getpid() > 90 and flags.setupFilesystems): +# don't let folks do anything stupid on !s390 +if (not flags.test and os.getpid() > 90 and flags.setupFilesystems and + not (iutil.getArch() == "s390" or iutil.getArch() == "s390x")): sys.stderr.write( - "You're running me on a live system! that's incredibly stupid.\n") + "You're running me on a live system! that's incredibly stupid.\n") sys.exit(1) import isys @@ -316,10 +319,6 @@ if (not flags.test): display_mode = 't' time.sleep(2) -# Force text mode on IBM s390/s390x -if iutil.getArch() == "s390" or iutil.getArch() == "s390x": - display_mode = 't' - if iutil.memInstalled() < isys.MIN_RAM: from snack import * @@ -367,6 +366,13 @@ if instClass.forceTextMode: # find out what video hardware is available to run installer # +# XXX kind of hacky +if os.environ.has_key('DISPLAY') and display_mode == 'g': + x_already_set = 1 +else: + x_already_set = 0 + + mousehw = mouse.Mouse(skipProbe = 1) #if display_mode == 'g': @@ -413,18 +419,26 @@ if (display_mode != 't' and method and display_mode = 't' time.sleep(2) -# if no mouse we force text mode -mousedev = mousehw.get() -if display_mode != 't' and mousedev[0] == "None - None": - # ask for the mouse type - if mouse.mouseWindow(mousehw) == 0: - print _("No mouse was detected. A mouse is required for graphical " +# XXX should be fixed to be more generic instead of just ifarching +if iutil.getArch() != "s390" and iutil.getArch() != "s390x": + # if no mouse we force text mode + mousedev = mousehw.get() + if display_mode != 't' and mousedev[0] == "None - None": + # ask for the mouse type + if mouse.mouseWindow(mousehw) == 0: + print _("No mouse was detected. A mouse is required for graphical " "installation. Starting text mode.") + display_mode = 't' + time.sleep(2) + else: + sys.stdout.write(_("Using mouse type: ")) + sys.stdout.write(mousehw.shortDescription()+'\n') +else: # s390 checks + if display_mode == 'g' and not os.environ.has_key('DISPLAY'): + print _("DISPLAY variable not set. Starting text mode!") display_mode = 't' time.sleep(2) - else: - sys.stdout.write(_("Using mouse type: ")) - sys.stdout.write(mousehw.shortDescription()+'\n') + # # startup X server is we're not already running under an X session @@ -449,14 +463,23 @@ if display_mode == 'g': display_mode = 't' time.sleep(2) else: - xcfg = xf86config.XF86Config(videohw.primaryCard(), - monitorhw, mousehw, runres) + # XXX x_already_set is a hack, see above + if x_already_set: + card = videocard.VideoCard() + else: + card = videohw.primaryCard() + xcfg = xf86config.XF86Config(card, monitorhw, mousehw, runres) + elif progmode != 'reconfig': - # only probe X related stuff if we're doing an install - import xf86config - xcfg = xf86config.XF86Config(videohw.primaryCard(), - monitorhw, mousehw, runres) + + # only probe X related stuff if we're doing an install + if iutil.getArch() == "s390" or iutil.getArch() == "s390x": + # XXX why doesn't videohw.primaryCard() dtrt on s390? + card = videocard.VideoCard() + else: + card = videohw.primaryCard() + xcfg = xf86config.XF86Config(card, monitorhw, mousehw, runres) import configFileData configFile = configFileData.configFileData() @@ -575,6 +598,8 @@ floppyDevice = floppy.probeFloppyDevice() id = instClass.installDataClass(extraModules, floppyDevice, configFileData) #id = instClass.installDataClass(extraModules, floppyDevice) +id.x_already_set = x_already_set + if mousehw: id.setMouse(mousehw) |