summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lumens <clumens@redhat.com>2006-11-13 17:05:13 +0000
committerChris Lumens <clumens@redhat.com>2006-11-13 17:05:13 +0000
commit9e503a926de3bf948e16fa3c6febe5f80fcfd501 (patch)
tree4fbcdf8632e64f878dc3ff0197c2c6ec15ccd49b
parent734df029046c40205b6b80378a3121d6d265dd78 (diff)
downloadanaconda-9e503a926de3bf948e16fa3c6febe5f80fcfd501.tar.gz
anaconda-9e503a926de3bf948e16fa3c6febe5f80fcfd501.tar.xz
anaconda-9e503a926de3bf948e16fa3c6febe5f80fcfd501.zip
We don't usually want to write out the xconfig and monitor lines into the
kickstart file, unless that info was already given during a kickstart install (#211977).
-rw-r--r--ChangeLog4
-rw-r--r--instdata.py2
-rw-r--r--xsetup.py72
3 files changed, 36 insertions, 42 deletions
diff --git a/ChangeLog b/ChangeLog
index be163760d..9828913a0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-11-13 Chris Lumens <clumens@redhat.com>
+ * xsetup.py (XSetup.writeKS): We don't usually want to write out the
+ xconfig and monitor lines into the kickstart file, unless that info
+ was already given during a kickstart install (#211977).
+
* docs/kickstart-docs.txt: Document --nobase argument.
2006-11-10 Paul Nasrat <pnasrat@redhat.com>
diff --git a/instdata.py b/instdata.py
index 192f6f66e..39f79eb8a 100644
--- a/instdata.py
+++ b/instdata.py
@@ -234,7 +234,7 @@ class InstallData:
self.instLanguage.writeKS(f)
if not self.isHeadless:
self.keyboard.writeKS(f)
- self.xsetup.writeKS(f, self.desktop)
+ self.xsetup.writeKS(f, self.desktop, self.ksdata)
self.network.writeKS(f)
self.zfcp.writeKS(f)
diff --git a/xsetup.py b/xsetup.py
index a9822fb1e..8eebf75e5 100644
--- a/xsetup.py
+++ b/xsetup.py
@@ -32,57 +32,47 @@ class XSetup:
self.xserver.generateConfig()
self.xserver.writeConfig(filename=fn+"/xorg.conf")
- def writeKS(self, f, desktop=None):
- # FIXME: we really should have at least the startxonboot and
- # defaultdesktop bits on s390
- if rhpl.getArch() == "s390":
+ def writeKS(self, f, desktop, ksconfig):
+ if self.skipx:
+ f.write("skipx\n")
return
-
- if self.skipx:
- f.write("skipx\n")
- return
- args = self.getArgList(self.xserver.hwstate.get_resolution(),
- self.xserver.hwstate.get_colordepth())
- if desktop:
+ # We don't want to write out the X config arguments unless they
+ # were previously specified in kickstart.
+ args = []
+ if desktop:
rl = desktop.getDefaultRunLevel()
if rl and str(rl) == '5':
- args = args + ['--startxonboot']
+ args += ['--startxonboot']
gui = desktop.getDefaultDesktop()
if gui:
- args = args + ['--defaultdesktop', string.lower(gui)]
+ args += ['--defaultdesktop', string.lower(gui)]
- if args != []:
+ # We don't want anything else on s390.
+ if rhpl.getArch() == "s390" and args != []:
f.write("xconfig %s\n" % string.join(args, " "))
- monitorArgs = self.getMonitorArgList()
- if monitorArgs != []:
- f.write("monitor %s\n" % string.join(monitorArgs, " "))
-
- def getMonitorArgList(self):
- args = []
- monitor = self.xserver.monitorhw
-
- if monitor.getMonitorHorizSync() is not None:
- args += [ "--hsync", monitor.getMonitorHorizSync() ]
-
- if monitor.getMonitorVertSync() is not None:
- args += [ "--vsync", monitor.getMonitorVertSync() ]
+ if ksconfig:
+ if ksconfig.xconfig["driver"] != "":
+ args += [ "--driver", ksconfig.xconfig["driver"] ]
+ if ksconfig.xconfig["videoRam"] != "":
+ args += [ "--videoram", ksconfig.xconfig["videoRam"] ]
+ if ksconfig.xconfig["resolution"] != "":
+ args += [ "--resolution", ksconfig.xconfig["resolution"] ]
+ if ksconfig.xconfig["depth"] != 0:
+ args += [ "--depth", str(ksconfig.xconfig["depth"]) ]
- return args
+ if args != []:
+ f.write("xconfig %s\n" % string.join(args, " "))
- def getArgList(self, res, depth):
args = []
- vc = self.xserver.videohw
-
- args = args + [ "--driver", '"' + vc.primaryCard().getDriver() + '"' ]
- vram = vc.primaryCard().getVideoRam()
- if vram is not None:
- args = args + [ "--videoram", vram]
+ if ksconfig:
+ if ksconfig.monitor["monitor"] != "";
+ args += [ "--monitor", ksconfig.monitor["monitor"] ]
+ if ksconfig.monitor["hsync"] != "":
+ args += [ "--hsync", ksconfig.monitor["hsync"] ]
+ if ksconfig.monitor["vsync"] != "":
+ args += [ "--vsync", ksconfig.monitor["vsync"] ]
- # XXX this isn't really quite right, but it works for the way
- # things are now
- args = args + [ "--resolution", res ]
- args = args + [ "--depth", str(depth) ]
-
- return args
+ if args != []:
+ f.write("monitor %s\n" % string.join(args, " "))