[sys-apps/keyboard-configuration-helpers] revision bump, add /etc/vconsole.conf support
This commit is contained in:
@@ -30,7 +30,9 @@ def _configure_system(root, keymap, variant, options):
|
||||
'mm', 'mn', 'mt', 'mv', 'ng', 'pk', 'si', 'sy', 'th', 'uz', 'vn', 'za']
|
||||
for k in vt_keymaps_fixes_us:
|
||||
vt_keymaps_fixes[k] = "us"
|
||||
|
||||
confd_keymaps = os.path.join(root, "etc/conf.d/keymaps")
|
||||
vconsole_conf = os.path.join(root, "etc/vconsole.conf")
|
||||
sys_key = vt_keymaps_fixes.get(keymap, keymap)
|
||||
|
||||
output = []
|
||||
@@ -48,6 +50,21 @@ def _configure_system(root, keymap, variant, options):
|
||||
f.flush()
|
||||
os.rename(confd_keymaps+".tmp", confd_keymaps)
|
||||
|
||||
# /etc/vconsole.conf support
|
||||
output = []
|
||||
if os.path.isfile(vconsole_conf):
|
||||
with open(vconsole_conf, "r") as f:
|
||||
for line in f.readlines():
|
||||
if line.startswith("KEYMAP="):
|
||||
continue
|
||||
output.append(line)
|
||||
|
||||
output.append("KEYMAP=%s\n" % (sys_key,))
|
||||
with open(vconsole_conf+".tmp", "w") as f:
|
||||
f.writelines(output)
|
||||
f.flush()
|
||||
os.rename(vconsole_conf+".tmp", vconsole_conf)
|
||||
|
||||
return 0
|
||||
|
||||
def _configure_xorg(root, keymap, variant, options):
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
# Copyright 2011 Fabio Erculiani
|
||||
# Copyright 2004-2013 Sabayon
|
||||
# Distributed under the terms of the GNU General Public License v2
|
||||
|
||||
DESCRIPTION="Sabayon Keyboard configuration wrapper"
|
||||
Reference in New Issue
Block a user