Kbdconfig fixes


Forum: DSL Ideas and Suggestions
Topic: Kbdconfig fixes
started by: curaga

Posted by curaga on May 25 2008,14:20
I stumbled upon two logical mistakes in the kbdconfig script. The first is wrong placement of the existing keymap (if booted with the lang=xx option), it's supposed to be like the other keymaps, xx-long-name short-name, but since it's the other way around, pressing enter on it might load the wrong keymap (for example you booted to fr-latin1, this would replace it with fr).
The other bug shows the "keymaps" directory in the list of keymaps when it obviously shouldn't.

Patch for both:
Quote
--- kbdconfig � 2008-05-25 13:41:04.000000000 +0300
+++ kbdconfig2 �2008-05-25 13:45:09.000000000 +0300
@@ -32,12 +32,12 @@
*) �TITLE="Please choose keyboard"; ;;
esac

-for i in `find /usr/share/keymaps -name \*map\*`; do
+for i in `find /usr/share/keymaps/* -name \*map\*`; do
� � � �FILE="${i%%.*map*}"; NAME="${FILE##*/}"
� � � �[ "$NAME" != "$KEYTABLE" ] && KEYMAPS="$KEYMAPS $NAME ${NAME%%-*}"
done

-DEFAULT="${KEYTABLE%%-*} $KEYTABLE"
+DEFAULT="$KEYTABLE ${KEYTABLE%%-*}"

dialog --clear --title "$TITLE" --menu "Default: ${KEYTABLE:-none}" 22 70 15 $DEFAULT $KEYMAPS 2>"$TMP"


Posted by roberts on May 25 2008,18:52
Thanks! Will patch.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.