summaryrefslogtreecommitdiffstats
path: root/PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh
diff options
context:
space:
mode:
Diffstat (limited to 'PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh')
-rwxr-xr-xPCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh33
1 files changed, 33 insertions, 0 deletions
diff --git a/PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh b/PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh
new file mode 100755
index 0000000..0d72681
--- /dev/null
+++ b/PCBSD/pc-sysinstall/backend-query/xkeyboard-models.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+FOUND="0"
+
+# Lets parse the xorg.list file, and see what models are supported
+while read line
+do
+
+ if [ "$FOUND" = "1" -a ! -z "$line" ]
+ then
+ echo $line | grep '! ' >/dev/null 2>/dev/null
+ if [ "$?" = "0" ]
+ then
+ exit 0
+ else
+ model="`echo $line | sed 's|(|[|g'`"
+ model="`echo $model | sed 's|)|]|g'`"
+ echo "$model"
+ fi
+ fi
+
+ if [ "${FOUND}" = "0" ]
+ then
+ echo $line | grep '! model' >/dev/null 2>/dev/null
+ if [ "$?" = "0" ]
+ then
+ FOUND="1"
+ fi
+ fi
+
+done < /usr/local/share/X11/xkb/rules/xorg.lst
+
+exit 0
OpenPOWER on IntegriCloud