I noticed the existing code to set {USER,MAIN}_CONFIG{,2} is a bit
messed up; USER_CONFIG refers to console-setup but MAIN_CONFIG refers to
keyboard which means lack of a keyboard.${VARIANT} causes the incorrect
error message and failure.
The assignments to CONFIG{,2} are also reversed; when USER_CONFIG CONFIG
=console-setup but when MAIN_CONFIG CONFIG=keyboard.
I've replaced all that code with a new function find_config() which
makes a call to findfile() and handles a graceful fallback if the
variant file isn't located. The /etc/default/ path is added into the
list searched by findfiles().
The actual config file(s) used are reported.
$ /bin/setupcon -v tj
Unable to find keyboard.tj.
setupcon: using configuration from /etc/default/console-setup.tj
Configuring /dev/tty1 /dev/tty2 /dev/tty3 /dev/tty4 /dev/tty5 /dev/tty6
The charmap is UTF-8
BackSpace is ^?
We are not on the console, the console is left unconfigured.
** Patch added: "Patch that uses findfile() to locate the variant config"
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1578540/+attachment/4656258/+files/setupcon.patch
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1578540
Title:
setupcon looks for VARIANT in wrong path: /usr/etc/default/
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1578540/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs