svn commit: r218802 - head/usr.sbin/pc-sysinstall/backend-query

Josh Paetzel jpaetzel at FreeBSD.org
Fri Feb 18 15:13:08 UTC 2011


Author: jpaetzel
Date: Fri Feb 18 15:13:07 2011
New Revision: 218802
URL: http://svn.freebsd.org/changeset/base/218802

Log:
  Sort available keyboard layouts to a more sane default.
  
  PR:	bin/154687
  Submitted by:	kmoore
  Approved by:	kib (mentor, implicit)

Modified:
  head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh

Modified: head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh
==============================================================================
--- head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh	Fri Feb 18 15:06:35 2011	(r218801)
+++ head/usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh	Fri Feb 18 15:13:07 2011	(r218802)
@@ -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


More information about the svn-src-all mailing list