#!/bin/bash

export PATH=/sbin:/bin:/usr/sbin:/usr/bin


test -f /tmp/locale || exit 0
. /tmp/locale

if test x"$XkbLayout" != x; then

mkdir -p /etc/X11/xorg.conf.d

cat > /etc/X11/xorg.conf.d/10-keyboard.conf <<EOF

Section "InputClass"
    Identifier             "evdev keyboard catchall"
    MatchIsKeyboard        "on"
    MatchDevicePath        "/dev/input/event*"
    Driver                 "evdev"
#    Option                 "XkbModel" "logiaccess"
    Option                 "XkbLayout" "$XkbLayout"
#    Option                 "XkbVariant" "at"
EndSection
EOF


fi
