setup.mouse greps /proc/bus/usb/devices to know if there is an USB mouse.
But in Slackware 14.2 there is no more /proc/bus/usb/devices directory, thus the test always fails and USB mice are not autodected.
This is unfortunate, because nowadays most mice are USB, so during installation the user is uselessly asked which is the mouse type. I propose this patch to fix that:
Code:
--- setup.mouse 2008-03-15 21:30:07.000000000 +0100
+++ setup.mouse.new 2016-12-15 11:24:29.004962521 +0100
@@ -4,8 +4,8 @@
TMP=/var/log/setup/tmp
GPM=/usr/sbin/gpm
# If the mouse is USB, we can autodetect it:
-if [ -r /proc/bus/usb/devices ]; then
- if cat /proc/bus/usb/devices | grep usb_mouse 1> /dev/null 2> /dev/null ; then
+if [ -r /proc/bus/input/devices ]; then
+ if grep -B3 Handlers=mouse /proc/bus/input/devices | grep Phys=usb 1>/dev/null 2>/dev/null; then
MOUSE_TYPE=usb
MTYPE="imps2"
( cd $T_PX/dev ; rm -f mouse ; ln -sf input/mice mouse )
This works here™ but of course there is no guarantee.
I have also considered grepping the output of lsusb, but I assume that then the test would fail for an USB mouse whose model is not registered in the hardware database, unless maybe finding one's way in the output of "lsusb -v", which I am too lazy to attempt.