Merge pull request #28505 from bluca/vconsole_debian

vconsole-setup: don't fail with an empty keymap
This commit is contained in:
Luca Boccassi 2023-07-24 18:02:32 +01:00 committed by GitHub
commit b9e39e11e2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View file

@ -55,6 +55,13 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
UKIFY=true
fi
# On Debian 'loadkeys us' fails
if [ "$ID" = "debian" ] || [ "$ID_LIKE" = "debian" ]; then
DEFAULT_KEYMAP=""
else
DEFAULT_KEYMAP="us"
fi
CONFIGURE_OPTS=(
-D sysvinit-path="$sysvinit_path"
-D rootprefix="$rootprefix"
@ -149,6 +156,7 @@ if [ ! -f "$BUILDDIR"/build.ninja ]; then
-D first-boot-full-preset=true
-D initrd=true
-D fexecve=true
-D default-keymap="$DEFAULT_KEYMAP"
)
# On debian-like systems the library directory is not /usr/lib64 but /usr/lib/<arch-triplet>/.

View file

@ -280,7 +280,7 @@ static int keyboard_load_and_wait(const char *vc, Context *c, bool utf8) {
map_toggle = context_get_config(c, VC_KEYMAP_TOGGLE);
/* An empty map means kernel map */
if (!map)
if (isempty(map))
return 0;
args[i++] = KBD_LOADKEYS;