keyboard layout while installing on Ubuntu/FAI

Waldemar Brodkorb fai at waldemar-brodkorb.de
Mon Nov 16 17:31:40 CET 2009


Hi,

attached patch might be useful to set the keyboard to another
layout while installing. Ubuntu switched to setupcon for keyboard
configuration. 

best regards
        Waldemar
-------------- next part --------------
Index: lib/load_keymap_consolechars
===================================================================
--- lib/load_keymap_consolechars	(Revision 5664)
+++ lib/load_keymap_consolechars	(Arbeitskopie)
@@ -9,4 +9,14 @@
 [ "$KEYMAP" ] || exit
 
 echo -n "Loading keymap(s) $KEYMAP ..."
+[ -x /bin/setupcon ] && (
+	layout=$(echo $KEYMAP|cut -d - -f 1)
+	variant=$(echo $KEYMAP|cut -d - -f 3)
+	sed -e "s#^XKBLAYOUT=.*#XKBLAYOUT=\"$layout\"#" \
+	    -e "s#^XKBVARIANT=.*#XKBVARIANT=\"$variant\"#" \
+	/etc/default/console-setup > /.console-setup
+	setupcon -k --force
+	echo "done."
+); exit
+ 
 loadkeys -q $KEYMAP && echo "done."


More information about the linux-fai-devel mailing list