diff options
author | nl6720 <nl6720@gmail.com> | 2023-08-05 12:45:58 +0300 |
---|---|---|
committer | nl6720 <nl6720@gmail.com> | 2023-08-05 12:45:58 +0300 |
commit | b0c109f1f3f936eeba395a7c9598a7d280df0323 (patch) | |
tree | 133773d2fbc2f26e6090ae880b24b1514029a677 | |
parent | ff139b40ff910182e4eab52c92cc49bb9628d326 (diff) |
/install/{keymap,sd-vconsole}: do not fail on KEYMAP=kernel
systemd-vconsole-setup added support for KEYMAP=kernel which perserves the kernel
keymap.
Make sure the keymap and sd-vconsole hooks do not fail by trying to literally add
a keymap with the name "kernel".
See https://github.com/systemd/systemd/commit/ef7f5baae8224960f78651e8a3cf4c1f1b870a31
-rw-r--r-- | install/keymap | 4 | ||||
-rw-r--r-- | install/sd-vconsole | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/install/keymap b/install/keymap index a73aad1..3b9100f 100644 --- a/install/keymap +++ b/install/keymap @@ -24,7 +24,9 @@ build() { touch "$BUILDROOT/keymap.utf8" loadkeys_opts+=('-u') fi - loadkeys "${loadkeys_opts[@]}" "${KEYMAP:-us}" -b >"$BUILDROOT/keymap.bin" + if [[ "$KEYMAP" != 'kernel' ]]; then + loadkeys "${loadkeys_opts[@]}" "${KEYMAP:-us}" -b >"$BUILDROOT/keymap.bin" + fi ) && add_runscript } diff --git a/install/sd-vconsole b/install/sd-vconsole index 382f22f..b8fba21 100644 --- a/install/sd-vconsole +++ b/install/sd-vconsole @@ -70,7 +70,7 @@ build() { # shellcheck disable=SC1091 [[ -s /etc/vconsole.conf ]] && . /etc/vconsole.conf - add_keymap_file "${KEYMAP:-us}.map" + [[ "$KEYMAP" != 'kernel' ]] && add_keymap_file "${KEYMAP:-us}.map" [[ -n "$KEYMAP_TOGGLE" ]] && add_keymap_file "${KEYMAP_TOGGLE}.map" if [[ -n "$FONT_MAP" ]]; then |