From: "Fabian Grünbichler" <f.gruenbichler@proxmox.com>
To: Proxmox VE development discussion <pve-devel@lists.proxmox.com>
Subject: [pve-devel] applied: [PATCH installer v2] set console keymap on language selection
Date: Thu, 13 Aug 2020 12:45:58 +0200 [thread overview]
Message-ID: <1597315547.d2roxsl164.astroid@nora.none> (raw)
In-Reply-To: <20200720163116.28270-1-s.ivanov@proxmox.com>
On July 20, 2020 6:31 pm, Stoiko Ivanov wrote:
> This is an enhancement for #2804
>
> Having a shell waiting on vt3, it improves user experience if it has the
> same keyboard map as the X11 installer.
>
> This is accomplished by setting the contents of '/etc/default/keyboard' and
> then running `setupcon`. Simply calling `loadkeys` would not work, since the
> keymaps in debian are generated from the x11 definitions by ckbcomp and then
> saved in '/etc/console-setup/'.
>
> Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
> ---
> v1->v2:
> * incorporated Thomas' feedback, making the whitespace prefix stripping more
> robust (Thanks!)
> * took a look at the generated file instead of only testing the keyboard layout
> (hence the 'gm' flags for the substition)
> proxinstall | 13 ++++++++++++-
> 1 file changed, 12 insertions(+), 1 deletion(-)
>
> diff --git a/proxinstall b/proxinstall
> index 556c509..edbb10e 100755
> --- a/proxinstall
> +++ b/proxinstall
> @@ -2668,8 +2668,19 @@ sub create_country_view {
> if (my $kmap = $cmap->{kmaphash}->{$sel}) {
> my $xkmap = $cmap->{kmap}->{$kmap}->{x11};
> my $xvar = $cmap->{kmap}->{$kmap}->{x11var};
> - syscmd ("setxkbmap $xkmap $xvar") if !$opt_testmode;
> $keymap = $kmap;
> +
> + if (! $opt_testmode) {
> + syscmd ("setxkbmap $xkmap $xvar");
> + my $kbd_config = qq{
> + XKBLAYOUT="$xkmap"
> + XKBVARIANT="$xvar"
> + BACKSPACE="guess"
> + };
> + $kbd_config =~ s/^\s+//gm;
> + write_config($kbd_config, '/etc/default/keyboard');
> + syscmd ("setupcon");
> + }
> }
> });
>
> --
> 2.20.1
>
>
>
> _______________________________________________
> pve-devel mailing list
> pve-devel@lists.proxmox.com
> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
>
>
>
prev parent reply other threads:[~2020-08-13 10:46 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-20 16:31 [pve-devel] " Stoiko Ivanov
2020-08-13 10:45 ` Fabian Grünbichler [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1597315547.d2roxsl164.astroid@nora.none \
--to=f.gruenbichler@proxmox.com \
--cc=pve-devel@lists.proxmox.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.