summaryrefslogtreecommitdiffstats
path: root/xf86config.py
diff options
context:
space:
mode:
authorjakub <jakub>1999-09-30 18:51:45 +0000
committerjakub <jakub>1999-09-30 18:51:45 +0000
commit958f048f5e3e54be6f28b5e84607b6eb361356e9 (patch)
tree2277913bcc00c54947eefa2f23c99f90627fc916 /xf86config.py
parent038c281383c23442e40cbe877a45be9805031574 (diff)
downloadanaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.tar.gz
anaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.tar.xz
anaconda-958f048f5e3e54be6f28b5e84607b6eb361356e9.zip
Keyboard autodetection, separated Keyboard stuff into separate module.
Diffstat (limited to 'xf86config.py')
-rw-r--r--xf86config.py14
1 files changed, 6 insertions, 8 deletions
diff --git a/xf86config.py b/xf86config.py
index 32d40bb1e..695555f17 100644
--- a/xf86config.py
+++ b/xf86config.py
@@ -7,6 +7,7 @@ import iutil
import kudzu
import time
import os
+from kbd import Keyboard
def _(x):
return x
@@ -31,14 +32,11 @@ class XF86Config:
self.keyRules = "xfree86"
self.keyModel = "pc101"
self.keyLayout = "us"
- # XXX temp hack to get GUI installs working on sparc
- try:
- f = open ("/dev/kbd", "r")
- f.close()
- self.keyRules = "sun"
- self.keyModel = "type5"
- except:
- pass
+ kbd = Keyboard()
+ if kbd.type == 'Sun':
+ self.keyRules = "sun"
+ self.keyModel = kbd.model
+ self.keyLayout = kbd.layout
self.keyVariant = ""
self.keyOptions = ""