#!/bin/sh
PREREQ=""
-DESCRIPTION="Setting up keyboard..."
+DESCRIPTION="Setting up console keyboard..."
. /scripts/casper-functions
log_begin_msg "$DESCRIPTION"
-kbd=us
+kbd=
cslayout=
csvariant=
csmodel=
# commandline
-if [ ! -z "${KBD}" ]; then
+if [ -n "${KBD}" ]; then
kbd="${KBD}"
+else
+ kbd=us
fi
-if [ ! -z "${CSLAYOUT}" ]; then
- cslayout="${CSLAYOUT}"
+
+really_export kbd
+
+if [ -n "${KLAYOUT}" ]; then
+ cslayout="${KLAYOUT}"
fi
-if [ ! -z "${CSVARIANT}" ]; then
- csvariant="${CSVARIANT}"
+if [ -n "${KVARIANT}" ]; then
+ csvariant="${KVARIANT}"
fi
-if [ ! -z "${CSMODEL}" ]; then
- csmodel="${CSMODEL}"
+if [ -n "${KMODEL}" ]; then
+ csmodel="${KMODEL}"
fi
if [ -x /root/bin/setupcon ] && [ -f /root/etc/default/console-setup ]; then
else
chroot /root /usr/sbin/install-keymap $kbd
casper-preseed /root debian-installer/keymap "$kbd"
+ casper-preseed /root kbd-chooser/method "$kbd"
fi
log_end_msg