[Bug 1578540] Re: setupcon looks for VARIANT in wrong path: /usr/etc/default/

TJ ubuntu at iam.tj
Thu May 5 09:39:35 UTC 2016


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
Foundations Bugs, which is subscribed to console-setup in Ubuntu.
https://bugs.launchpad.net/bugs/1578540

Title:
  setupcon looks for VARIANT  in wrong path: /usr/etc/default/

Status in console-setup package in Ubuntu:
  New

Bug description:
  On 16.04 amd64:

  $ ls /etc/default/console-setup*
  /etc/default/console-setup  /etc/default/console-setup.tj

  $ sudo setupcon -v tj
  [sudo] password for tj: 
  setupcon: None of /usr/etc/default/keyboard.tj nor /home/tj/.console-setup.tj exists.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/console-setup/+bug/1578540/+subscriptions



More information about the foundations-bugs mailing list