diff options
author | Mike Fulbright <msf@redhat.com> | 1999-12-06 21:24:57 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 1999-12-06 21:24:57 +0000 |
commit | 0d04e6b56c99dd4ea0145c1799863efc94fbbc73 (patch) | |
tree | 7971ef334d06a2f1cb88bb1540da61a26434f41e /anaconda | |
parent | b6ae83ecc9c73cb5037ea3a10b7827ea947a6031 (diff) | |
download | anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.tar.gz anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.tar.xz anaconda-0d04e6b56c99dd4ea0145c1799863efc94fbbc73.zip |
- Added support to use existing XF86Config file in reconfig mode
- Reconfig mode following inittab default runlevel display mode (text for 3,
GUI for 5)
- made dhcp the default in GUI mode as well as text mode
Diffstat (limited to 'anaconda')
-rwxr-xr-x | anaconda | 32 |
1 files changed, 27 insertions, 5 deletions
@@ -56,6 +56,7 @@ extraModules = [] # display mode is either 'g' for graphical or 't' for text display_mode = 'g' +forced_display_mode = None # booleans - value is 0 for false or non-zero for true # test - in test mode? @@ -101,9 +102,9 @@ for n in args: (str, arg) = n if (str == '-G' or str == '--gui'): - display_mode = 'g' + forced_display_mode = 'g' elif (str == '-T' or str == '--text'): - display_mode = 't' + forced_display_mode = 't' elif (str == '-R' or str == '--reconfig'): reconfigOnly = 1 progmode = 'reconfig' @@ -120,7 +121,7 @@ for n in args: debug = 1 elif (str == '--kickstart'): kickstart = arg - display_mode = 't' + forced_display_mode = 't' elif (str == '-r' or str == '--rootpath'): rootPath = arg localInstall = 1 @@ -190,7 +191,24 @@ from kickstart import Kickstart # if (not test): if (iutil.memInstalled() < 30000): - display_mode = 't' + forced_display_mode = 't' + +# +# if in reconfig mode set display mode based on inittab default runlevel +# +# but always let command line specified mode override defaults +# +if (forced_display_mode == None): + if (reconfigOnly != 0): + if (iutil.getDefaultRunlevel() == '5' and + os.access("/etc/X11/XF86Config", os.R_OK)): + display_mode = 'g' + else: + display_mode = 't' + else: + display_mode = 'g' +else: + display_mode = forced_display_mode # # startup X server is we're not already running under an X session @@ -198,7 +216,11 @@ if (not test): if (display_mode == 'g' and not os.environ.has_key('DISPLAY')): import xserver try: - result = xserver.startX () + if (reconfigOnly == 0): + result = xserver.startX () + else: + result = xserver.start_existing_X () + except RuntimeError: print "X startup failed, falling back to text mode" display_mode = 't' |