diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:29:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-27 10:29:49 +0000 |
commit | 1fd7da94235a7ee9cc21d25d39e6c03421ef5ab6 (patch) | |
tree | b4cc647f3e5833b224c5fd593023397a80cca78f /hooks/keymap | |
parent | Initial commit. (diff) | |
download | initramfs-tools-upstream.tar.xz initramfs-tools-upstream.zip |
Adding upstream version 0.140.upstream/0.140upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'hooks/keymap')
-rwxr-xr-x | hooks/keymap | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/hooks/keymap b/hooks/keymap new file mode 100755 index 0000000..64f8e6d --- /dev/null +++ b/hooks/keymap @@ -0,0 +1,40 @@ +#!/bin/sh + +PREREQ="" + +prereqs() +{ + echo "$PREREQ" +} + +case $1 in +# get pre-requisites +prereqs) + prereqs + exit 0 + ;; +esac + +# Hook to load keymaps into the initramfs if requested by KEYMAP="y" +if [ "$KEYMAP" != "y" ] && [ "$KEYMAP" != "Y" ]; then + exit 0 +fi + +if [ ! -x /bin/setupcon ]; then + echo "setupcon is missing. Please install the 'console-setup' package." + exit 0 +fi + +. /usr/share/initramfs-tools/hook-functions + +# Tell setupcon to copy/create the files it needs. +setupcon --setup-dir "$DESTDIR" + +# Copy additional files that setupcon needs. We assume they are +# executables. +while read -r file; do + copy_exec "$file" +done < "$DESTDIR/morefiles" +rm -f "$DESTDIR/morefiles" + +exit 0 |