diff options
author | jpaetzel <jpaetzel@FreeBSD.org> | 2011-02-18 15:13:07 +0000 |
---|---|---|
committer | jpaetzel <jpaetzel@FreeBSD.org> | 2011-02-18 15:13:07 +0000 |
commit | 6c73158fbaece937d263a20fea499ae58db78eba (patch) | |
tree | afba1d8826fb158e0240f256607aaca99b8471f1 /usr.sbin | |
parent | 7d7d9a901cb36e27c0d8c9270f25c01eda1a1bdd (diff) | |
download | FreeBSD-src-6c73158fbaece937d263a20fea499ae58db78eba.zip FreeBSD-src-6c73158fbaece937d263a20fea499ae58db78eba.tar.gz |
Sort available keyboard layouts to a more sane default.
PR: bin/154687
Submitted by: kmoore
Approved by: kib (mentor, implicit)
Diffstat (limited to 'usr.sbin')
-rwxr-xr-x | usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh b/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh index bf63a72..4ffaad5 100755 --- a/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh +++ b/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh @@ -26,6 +26,12 @@ # $FreeBSD$ FOUND="0" +TMPLIST="/tmp/.xkeyList.$$" +XLST="/usr/local/share/X11/xkb/rules/xorg.lst" + +if [ ! -e "${XLST}" ] ; then + exit 1 +fi # Lets parse the xorg.list file, and see what layouts are supported while read line @@ -36,9 +42,9 @@ do echo $line | grep '! ' >/dev/null 2>/dev/null if [ "$?" = "0" ] then - exit 0 + break else - echo "$line" + echo "$line" >> ${TMPLIST} fi fi @@ -51,6 +57,13 @@ do fi fi -done < /usr/local/share/X11/xkb/rules/xorg.lst +done < $XLST + +# Display the output, with us English as the first entry +echo "us U.S. English" +sort -b -d +1 $TMPLIST + +# Delete the tmp file +rm $TMPLIST exit 0 |