Sophie

Sophie

distrib > Mageia > 1 > i586 > media > core-updates-src > by-pkgid > afe76a9ef95a1b7e6257bc39819e7f31 > files > 15

x11-server-1.10.1-1.2.mga1.src.rpm

#!/bin/sh
#
# Trivial egregious hack to load the console keyboard layout into XKB.
#

. /etc/sysconfig/keyboard > /dev/null 2> /dev/null || exit 0

if [ -z "$XkbLayout" ]; then
    [ -x /usr/sbin/keyboarddrake ] || exit 0
    /usr/sbin/keyboarddrake --migrate
    . /etc/sysconfig/keyboard
fi

[ -n "$XkbLayout" ] || exit 0

if [ -n "$UDEV_LOG" ]; then
    # if $UDEV_LOG is set, I hope we're being called by udev
    [ -z "$XkbModel" ]    || echo "xkbmodel=$XkbModel"
    [ -z "$XkbLayout" ]   || echo "xkblayout=$XkbLayout"
    [ -z "$XkbVariant" ]  || echo "xkbvariant=$XkbVariant"
    [ -z "$XkbOptions" ]  || echo "xkboptions=$XkbOptions"
else
    # we're being called stand-alone
    # this will not work if we're not root
    [ -x /sbin/udevadm ] && /sbin/udevadm trigger --subsystem-match=input --action=add
fi