diff --git a/sys-apps/keyboard-configuration-helpers/files/2.6/keyboard-setup-2 b/sys-apps/keyboard-configuration-helpers/files/2.6/keyboard-setup-2 index bb9ae1863..aa59134b4 100755 --- a/sys-apps/keyboard-configuration-helpers/files/2.6/keyboard-setup-2 +++ b/sys-apps/keyboard-configuration-helpers/files/2.6/keyboard-setup-2 @@ -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): diff --git a/sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r1.ebuild b/sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r2.ebuild similarity index 92% rename from sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r1.ebuild rename to sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r2.ebuild index 42c216764..2ceda5f29 100644 --- a/sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r1.ebuild +++ b/sys-apps/keyboard-configuration-helpers/keyboard-configuration-helpers-2.6-r2.ebuild @@ -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"