diff options
author | Mike Fulbright <msf@redhat.com> | 2000-04-03 20:25:17 +0000 |
---|---|---|
committer | Mike Fulbright <msf@redhat.com> | 2000-04-03 20:25:17 +0000 |
commit | 4e668251334f518d2817000c1faef7d3741e873b (patch) | |
tree | 6a451b51d147dafeca1f16bb5340568aca70ee77 /xf86config.py | |
parent | 2baf867495ee7f85ab16ebbba9d2cc3eb78783fe (diff) | |
download | anaconda-4e668251334f518d2817000c1faef7d3741e873b.tar.gz anaconda-4e668251334f518d2817000c1faef7d3741e873b.tar.xz anaconda-4e668251334f518d2817000c1faef7d3741e873b.zip |
(drmike) Fixed --server and --card options for kickstart xconfig directive. Did not work in 6.1 or 6.2 apparently.
Diffstat (limited to 'xf86config.py')
-rw-r--r-- | xf86config.py | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/xf86config.py b/xf86config.py index d66ab3849..d09066e1f 100644 --- a/xf86config.py +++ b/xf86config.py @@ -165,7 +165,8 @@ class XF86Config: self.monID = monitor self.monHoriz = hrange self.monVert = vrange - + + # must pass card as a dictionary entry for desired card def setVidcard (self, card): self.vidCards = [card] self.primary = 0 @@ -174,6 +175,36 @@ class XF86Config: self.devID = self.vidCards[self.primary]["NAME"] self.server = self.vidCards[self.primary]["SERVER"] + # locate dictionary entry for requested card name + # case matters + def locateVidcard (self, card): + cards = self.cards() + if cards.has_key(card): + return cards[card] + else: + return None + + # server is string name of X server (eg. "SVGA") + # case matters + def setVidcardByServer (self, server): + tmpcard = "Generic " + server + + entry = self.locateVidcard (tmpcard) + + if entry != None: + self.setVidcard (entry) + else: + raise RuntimeError, "Could not find valid video card driver." + + # card is string name of video card (eg. "Generic SVGA") + def setVidcardByName (self, card): + entry = self.locateVidcard (card) + + if entry != None: + self.setVidcard (entry) + else: + raise RuntimeError, "Could not find valid video card driver." + def probe (self, probeMonitor = 1): # XXX defer monitor probe, then re-enable this check # if self.probed: |