summaryrefslogtreecommitdiffstats
path: root/anaconda
diff options
context:
space:
mode:
authorMike Fulbright <msf@redhat.com>1999-12-06 21:24:57 +0000
committerMike Fulbright <msf@redhat.com>1999-12-06 21:24:57 +0000
commit0d04e6b56c99dd4ea0145c1799863efc94fbbc73 (patch)
tree7971ef334d06a2f1cb88bb1540da61a26434f41e /anaconda
parentb6ae83ecc9c73cb5037ea3a10b7827ea947a6031 (diff)
downloadanaconda-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-xanaconda32
1 files changed, 27 insertions, 5 deletions
diff --git a/anaconda b/anaconda
index 160e724dc..636fdcb92 100755
--- a/anaconda
+++ b/anaconda
@@ -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'