all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Stoiko Ivanov <s.ivanov@proxmox.com>
To: pve-devel@lists.proxmox.com
Subject: [pve-devel] [PATCH installer 3/3] set the keymap on the installer console
Date: Tue, 10 Nov 2020 15:15:30 +0100	[thread overview]
Message-ID: <20201110141530.30904-4-s.ivanov@proxmox.com> (raw)
In-Reply-To: <20201110141530.30904-1-s.ivanov@proxmox.com>

this patch partially reverts 8bc528041ba85e1b9bd4c17638a2302088bc19ce
by writing /etc/default/keyboard and running `setupcon` in the background
the delay should not harm the UX in the installer

Signed-off-by: Stoiko Ivanov <s.ivanov@proxmox.com>
---
 proxinstall | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/proxinstall b/proxinstall
index 1551e18..2bc30e8 100755
--- a/proxinstall
+++ b/proxinstall
@@ -2784,6 +2784,18 @@ sub create_country_view {
 
 	    if (! $opt_testmode) {
 		syscmd ("setxkbmap $xkmap $xvar");
+
+		my $kbd_config = qq{
+		    XKBLAYOUT="$xkmap"
+		    XKBVARIANT="$xvar"
+		    BACKSPACE="guess"
+		};
+		$kbd_config =~ s/^\s+//gm;
+
+		run_in_background( sub {
+		    write_config($kbd_config, '/etc/default/keyboard');
+		    system("setupcon");
+		});
 	    }
 	}
     });
-- 
2.20.1





  parent reply	other threads:[~2020-11-10 14:15 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-10 14:15 [pve-devel] [PATCH installer 0/3] memorize keyboard layout and run setupcon in background Stoiko Ivanov
2020-11-10 14:15 ` [pve-devel] [PATCH installer 1/3] memorize keyboard layout selection Stoiko Ivanov
2020-11-10 14:15 ` [pve-devel] [PATCH installer 2/3] add run_in_background Stoiko Ivanov
2020-11-10 14:15 ` Stoiko Ivanov [this message]
2020-11-10 14:33 ` [pve-devel] [PATCH installer 0/3] memorize keyboard layout and run setupcon in background Oguz Bektas
2020-12-10 19:07 ` [pve-devel] applied-series: " Thomas Lamprecht

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=20201110141530.30904-4-s.ivanov@proxmox.com \
    --to=s.ivanov@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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal