[virt-tools-list] [PATCH] Check /etc/default/keyboard when finding keyboard layout

Martin Ellis martin at ellis.name
Thu Oct 28 19:56:24 UTC 2010


Hi,

virt-install checks the host system to determine the keyboard layout
for virtual machines it creates.
One of the places it checks is /etc/default/console-setup.  In the
next version of Debian, the file to look for is /etc/default/keyboard
[1].

Currently, the Debian package has a patch to virt-install to check
this different path:
-CONSOLE_SETUP_CONF = "/etc/default/console-setup"
+CONSOLE_SETUP_CONF = "/etc/default/keyboard"

I've attached a patch that will check for 'keyboard' and then 'console-setup'

This patch:
 * Makes the above distro-specific patch unnecessary;
 * Allows the Debian package to be used on Ubuntu (great when Ubuntu
is behind the latest version);
 * Is more robust for users upgrading from one Debian version to the
next (particularly if they don't upgrade everything at once);
 * Reduces the amount of code in util.py without breaking API compatibility
 * Removes a copy and paste error in util.py (XORG_CONF in
_console_setup_keymap()).

Martin


[1] http://debian-user.blogspot.com/2010/06/etcdefaultkeyboard-replaces.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kbd-layout.diff
Type: text/x-patch
Size: 2882 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/virt-tools-list/attachments/20101028/cf7a7670/attachment.bin>


More information about the virt-tools-list mailing list