X Strike Force X.Org X11 SVN commit: r112 - in trunk/debian: . local
Author: dnusinow
Date: 2005-05-16 22:34:54 -0500 (Mon, 16 May 2005)
New Revision: 112
Modified:
trunk/debian/changelog
trunk/debian/local/dexconf
Log:
Merge changes from xfree tree to local/dexconf
Modified: trunk/debian/changelog
===================================================================
--- trunk/debian/changelog 2005-05-17 03:28:37 UTC (rev 111)
+++ trunk/debian/changelog 2005-05-17 03:34:54 UTC (rev 112)
@@ -21,6 +21,8 @@
- Merge changes from xfree tree to scripts directory:
- manifest-install-reconcile
- validate-posix-sh
+ - Merge changes from xfree tree to local directory:
+ - dexconf
- Re-add jisx0208.1983-0.enc.gz to MANIFEST.all's list of font encodings
until I know more about why it was removed.
Modified: trunk/debian/local/dexconf
===================================================================
--- trunk/debian/local/dexconf 2005-05-17 03:28:37 UTC (rev 111)
+++ trunk/debian/local/dexconf 2005-05-17 03:34:54 UTC (rev 112)
@@ -70,6 +70,46 @@
echo $(IFS=", "; set -- $RET; while [ $# -gt 0 ]; do echo \"$1\"; shift; done)
}
+# Find out if our mouse device is multiplexed; this depends on both the mouse
+# port and the kernel version.
+# TODO: Change this to simply fetch a value from /var/lib/xserver-common/config,
+# once we have written an init script that creates that file.
+has_multiplexed_mouse () {
+ # Initially assume the mouse is not multiplexed.
+ _RET=1
+ case $(uname -s) in
+ Linux)
+ case $(uname -r) in
+ 2.4*)
+ case "$MOUSE_PORT" in
+ /dev/input/mice|/dev/gpmdata)
+ _RET=0
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ 2.6*)
+ case "$MOUSE_PORT" in
+ /dev/input/mice|/dev/gpmdata|/dev/psaux|/dev/misc/psaux|/dev/ttyS*|/dev/tts/*)
+ _RET=0
+ ;;
+ *)
+ ;;
+ esac
+ ;;
+ *)
+ # We don't recognize any kernel versions other than 2.4 and 2.6.
+ ;;
+ esac
+ ;;
+ *)
+ # We don't recognize any kernel names other than Linux.
+ ;;
+ esac
+ return $_RET
+}
+
PROGNAME=${0##*/}
SHOWHELP=
EARLYEXIT=
@@ -451,8 +491,7 @@
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
SECTION
-if [ "$MOUSE_PORT" != "/dev/input/mice" ] \
- && [ "$MOUSE_PORT" != "/dev/gpmdata" ]; then
+if has_multiplexed_mouse; then
printf "\tInputDevice\t\"Generic Mouse\"\n" >&4
fi
if [ -n "$LAPTOP" ]; then
Reply to: