From 517c42b8aa7ef23d2f897aeb1e840dc0dca8d673 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Sun, 10 Jan 2016 13:39:58 +0100 Subject: Fix X keyboard configuration if no custom layout was chosen at boot. --- liveinit | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/liveinit b/liveinit index 2193b33..7d41013 100755 --- a/liveinit +++ b/liveinit @@ -404,15 +404,18 @@ EOT XKBLAYOUT="$(echo $KEYMAP |cut -c1-2)" fi fi - echo "${INITRD}: Switching live X desktop to '$XKBLAYOUT' keyboard" - # If the layout is not 'us' then add 'us' as a secondary nevertheless: - if [ "$XKBLAYOUT" != "us" ]; then - XKBLAYOUT="$XKBLAYOUT,us" - XKBVARIANT="$XKBVARIANT," - XKBOPTIONS="grp:alt_shift_toggle,$XKBOPTIONS" - fi - mkdir -p /mnt/overlay/etc/X11/xorg.conf.d - cat < /mnt/overlay/etc/X11/xorg.conf.d/30-keyboard.conf + else + XKBLAYOUT="us" + fi + echo "${INITRD}: Switching live X desktop to '$XKBLAYOUT' keyboard" + # If the layout is not 'us' then add 'us' as a secondary nevertheless: + if [ "$XKBLAYOUT" != "us" ]; then + XKBLAYOUT="$XKBLAYOUT,us" + XKBVARIANT="$XKBVARIANT," + XKBOPTIONS="grp:alt_shift_toggle,$XKBOPTIONS" + fi + mkdir -p /mnt/overlay/etc/X11/xorg.conf.d + cat < /mnt/overlay/etc/X11/xorg.conf.d/30-keyboard.conf Section "InputClass" Identifier "keyboard-all" Driver "evdev" @@ -422,7 +425,6 @@ Section "InputClass" MatchIsKeyboard "on" EndSection EOT - fi if [ ! -z "$LOCALE" ]; then # Configure custom locale: -- cgit v1.2.3