summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Katz <katzj@redhat.com>2008-07-17 13:13:04 -0400
committerJeremy Katz <katzj@redhat.com>2008-07-17 13:13:04 -0400
commit548a07583d2bf6fd725e6441cc78fbdd3d95d002 (patch)
treef0e8b5d401ed41166a4d6b9038fc4ef730483c4c
parent4eaaad32030fd04e8bd9e6d9dc2dc37cbd9de719 (diff)
downloadanaconda-548a07583d2bf6fd725e6441cc78fbdd3d95d002.tar.gz
anaconda-548a07583d2bf6fd725e6441cc78fbdd3d95d002.tar.xz
anaconda-548a07583d2bf6fd725e6441cc78fbdd3d95d002.zip
Support xdriver= again
For now, we need to be able to support xdriver= as sometimes, drivers are broken and people want vesa instead. This is kind of lame and it'd be nice if we didn't have to carry such hacks. So take the argument and write out a minimal xorg.conf if it's given. This is all hidden away in the anaconda class, although arguably it could belong in instdata instead. But if it's in instdata, more things might actually try to depend or care about it. And we don't want that.
-rwxr-xr-xanaconda19
-rw-r--r--instdata.py2
2 files changed, 21 insertions, 0 deletions
diff --git a/anaconda b/anaconda
index 6c005be5d..e713713d4 100755
--- a/anaconda
+++ b/anaconda
@@ -487,6 +487,21 @@ class Anaconda:
self.updateSrc = None
self.mediaDevice = None
+ # *sigh* we still need to be able to write this out
+ self.xdriver = None
+
+ def writeXdriver(self, instPath="/"):
+ # this should go away at some point, but until it does, we
+ # need to keep it around. it could go into instdata but this
+ # isolates it a little more
+ if self.xdriver is None:
+ return
+ if not os.path.isdir("%s/etc/X11" %(instPath,)):
+ os.makedirs("%s/etc/X11" %(instPath,), mode=0755)
+ f = open("%s/etc/X11/xorg.conf" %(instPath,), 'w')
+ f.write('Section "Device"\n\tIdentifier "Videocard0"\n\tDriver "%s"\nEndSection\n' % self.xdriver)
+ f.close()
+
def setDispatch(self):
self.dispatch = dispatch.Dispatcher(self)
@@ -665,6 +680,10 @@ if __name__ == "__main__":
if opts.virtpconsole:
flags.virtpconsole = opts.virtpconsole
+ if opts.xdriver:
+ anaconda.xdriver = opts.xdriver
+ anaconda.writeXdriver()
+
# probing for hardware on an s390 seems silly...
if iutil.isS390():
opts.isHeadless = True
diff --git a/instdata.py b/instdata.py
index 227557aea..711145fce 100644
--- a/instdata.py
+++ b/instdata.py
@@ -150,6 +150,8 @@ class InstallData:
def write(self):
self.instLanguage.write (self.anaconda.rootPath)
+ self.anaconda.writeXdriver(self.anaconda.rootPath)
+
if not self.isHeadless:
self.keyboard.write (self.anaconda.rootPath)