void-packages/srcpkgs/initramfs-tools/files/hooks/keymap

32 lines
546 B
Plaintext
Raw Normal View History

#!/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
2011-10-17 18:09:15 +02:00
[ ! -x ${ROOTDIR}/sbin/loadkeys -a ! -x ${ROOTDIR}/sbin/dumpkeys ] && exit 0
2011-10-17 18:09:15 +02:00
. ${ROOTDIR}/usr/share/initramfs-tools/hook-functions
2011-10-17 18:09:15 +02:00
${ROOTDIR}/sbin/dumpkeys > ${DESTDIR}/kmap-tmp
${ROOTDIR}/sbin/loadkeys -u -b ${DESTDIR}/kmap-tmp > ${DESTDIR}/etc/bkeymap
rm -f ${DESTDIR}/kmap-tmp
exit 0