bin/154687: bin: usr.sbin/pc-sysinstall - Fixed sorting for
keyboard layouts
Kris Moore
kmoore at FreeBSD.org
Fri Feb 11 15:20:08 UTC 2011
>Number: 154687
>Category: bin
>Synopsis: bin: usr.sbin/pc-sysinstall - Fixed sorting for keyboard layouts
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Fri Feb 11 15:20:07 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Kris Moore
>Release: 9.0-Current
>Organization:
PC-BSD / iXsystems
>Environment:
FreeBSD 9.0-CURRENT
>Description:
This small fix is for the sorting of available keyboard layouts to a more sane default.
>How-To-Repeat:
>Fix:
Patch attached with submission follows:
diff -ruN usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh
--- usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh 2011-01-27 10:26:03.667376965 -0500
+++ usr.sbin/pc-sysinstall/backend-query/xkeyboard-layouts.sh 2011-01-27 11:04:16.000000000 -0500
@@ -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 @@
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 @@
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
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-bugs
mailing list