[PATCH 3/3] Stop writing /etc/sysconfig/keyboard (#871543)

Michal Schmidt mschmidt at redhat.com
Tue Dec 4 13:29:58 UTC 2012


Write only /etc/vconsole.conf.
---
 pyanaconda/keyboard.py | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/pyanaconda/keyboard.py b/pyanaconda/keyboard.py
index 5d4db68..828c709 100755
--- a/pyanaconda/keyboard.py
+++ b/pyanaconda/keyboard.py
@@ -133,8 +133,8 @@ def get_layouts_xorg_conf(keyboard):
 def write_keyboard_config(keyboard, root, convert=True, weight=0):
     """
     Function that writes files with layouts configuration to
-    $root/etc/X11/xorg.conf.d/01-anaconda-layouts.conf,
-    $root/etc/sysconfig/keyboard and $root/etc/vconsole.conf.
+    $root/etc/X11/xorg.conf.d/01-anaconda-layouts.conf and
+    $root/etc/vconsole.conf.
 
     @param keyboard: ksdata.keyboard object
     @param root: path to the root of the installed system
@@ -162,9 +162,6 @@ def write_keyboard_config(keyboard, root, convert=True, weight=0):
     xconf_dir = os.path.normpath(root + "/etc/X11/xorg.conf.d")
     xconf_file = "%0.2d-anaconda-keyboard.conf" % weight
 
-    sysconf_dir = os.path.normpath(root + "/etc/sysconfig")
-    sysconf_file = "keyboard"
-
     vcconf_dir = os.path.normpath(root + "/etc")
     vcconf_file = "vconsole.conf"
 
@@ -186,13 +183,6 @@ def write_keyboard_config(keyboard, root, convert=True, weight=0):
 
     if keyboard.vc_keymap:
         try:
-            with open(os.path.join(sysconf_dir, sysconf_file), "w") as fobj:
-                fobj.write('KEYMAP="%s"\n' % keyboard.vc_keymap)
-
-        except IOError as ioerr:
-            errors.append("Cannot write sysconfig keyboard configuration file")
-
-        try:
             with open(os.path.join(vcconf_dir, vcconf_file), "w") as fobj:
                 fobj.write('KEYMAP="%s"\n' % keyboard.vc_keymap)
         except IOError as ioerr:
-- 
1.8.0.1



More information about the anaconda-patches mailing list