Mario Lang, le Mon 06 Oct 2008 10:57:40 +0200, a écrit :
> > brltty-udeb currently detects USB devices 0403:6001 as a handytech
> > device. However, that conflicts with people using some ftdi serial to
> > USB converters: since udev runs brltty before the kernel command line
> > gets parsed by S37brltty, one can not set brltty=something,ttyUSB0.
> >
> > I guess the safest way would be to just comment the 0403:6001 line in
> > debian/brltty-udeb.udev.rules
> 
> I know, yes, but thats *my* display.  Convince me that I should
> cripple autodetection of my display type.

gah :)

> What about brltty=off which would prevent brltty from starting at all?

Actually I wasn't talking about sighted users, but about blind users
using an FTDI serial to USB converter to plug a serial braille device.

What we could do is making the udev script detect the brltty= option
on the kernel command line and in that case just exit, i.e. make the
kernel command line override autodetection. That will make brltty=off
work indeed.  I've attached a patch that seems to work.

Samuel
diff -urN brltty-3.10~r3724/debian/brltty-udeb.dirs 
brltty-3.10~r3724.mine/debian/brltty-udeb.dirs
--- brltty-3.10~r3724/debian/brltty-udeb.dirs   2008-10-06 11:25:09.000000000 
+0200
+++ brltty-3.10~r3724.mine/debian/brltty-udeb.dirs      2008-10-06 
11:26:02.000000000 +0200
@@ -2,5 +2,6 @@
 etc/udev/rules.d
 lib/brltty
 lib/debian-installer-startup.d
+lib/udev
 sbin
 usr/lib/finish-install.d
diff -urN brltty-3.10~r3724/debian/brltty-udeb.udev.rules 
brltty-3.10~r3724.mine/debian/brltty-udeb.udev.rules
--- brltty-3.10~r3724/debian/brltty-udeb.udev.rules     2008-10-06 
11:25:09.000000000 +0200
+++ brltty-3.10~r3724.mine/debian/brltty-udeb.udev.rules        2008-10-06 
11:26:44.000000000 +0200
@@ -5,28 +5,28 @@
 SUBSYSTEM!="usb_device", GOTO="brltty_rules_end"
 
 # Alva
-SYSFS{idVendor}=="06b0", SYSFS{idProduct}=="0001", RUN+="/lib/brltty/brltty.sh 
-b al -d usb:"
+SYSFS{idVendor}=="06b0", SYSFS{idProduct}=="0001", RUN+="/lib/udev/brltty.sh 
-b al -d usb:"
 
 # Baum
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe71", RUN+="/lib/brltty/brltty.sh 
-b bm -d usb:"
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe72", RUN+="/lib/brltty/brltty.sh 
-b bm -d usb:"
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe73", RUN+="/lib/brltty/brltty.sh 
-b bm -d usb:"
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe74", RUN+="/lib/brltty/brltty.sh 
-b bm -d usb:"
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe75", RUN+="/lib/brltty/brltty.sh 
-b bm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe71", RUN+="/lib/udev/brltty.sh 
-b bm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe72", RUN+="/lib/udev/brltty.sh 
-b bm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe73", RUN+="/lib/udev/brltty.sh 
-b bm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe74", RUN+="/lib/udev/brltty.sh 
-b bm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="fe75", RUN+="/lib/udev/brltty.sh 
-b bm -d usb:"
 
 # FreedomScientific
-SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0100", RUN+="/lib/brltty/brltty.sh 
-b fs -d usb:"
-SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0111", RUN+="/lib/brltty/brltty.sh 
-b fs -d usb:"
-SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0112", RUN+="/lib/brltty/brltty.sh 
-b fs -d usb:"
+SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0100", RUN+="/lib/udev/brltty.sh 
-b fs -d usb:"
+SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0111", RUN+="/lib/udev/brltty.sh 
-b fs -d usb:"
+SYSFS{idVendor}=="0f4e", SYSFS{idProduct}=="0112", RUN+="/lib/udev/brltty.sh 
-b fs -d usb:"
 
 # HandyTech
-SYSFS{idVendor}=="0921", SYSFS{idProduct}=="1200", RUN+="/lib/brltty/brltty.sh 
-b ht -d usb:"
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", RUN+="/lib/brltty/brltty.sh 
-b ht -d usb:"
+SYSFS{idVendor}=="0921", SYSFS{idProduct}=="1200", RUN+="/lib/udev/brltty.sh 
-b ht -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="6001", RUN+="/lib/udev/brltty.sh 
-b ht -d usb:"
 
 # Papenmeier
-SYSFS{idVendor}=="0403", SYSFS{idProduct}=="f208", RUN+="/lib/brltty/brltty.sh 
-b pm -d usb:"
+SYSFS{idVendor}=="0403", SYSFS{idProduct}=="f208", RUN+="/lib/udev/brltty.sh 
-b pm -d usb:"
 
 # Voyager
-SYSFS{idVendor}=="0798", SYSFS{idProduct}=="0001", RUN+="/lib/brltty/brltty.sh 
-b vo -d usb:"
+SYSFS{idVendor}=="0798", SYSFS{idProduct}=="0001", RUN+="/lib/udev/brltty.sh 
-b vo -d usb:"
 
 LABEL="brltty_rules_end"
diff -urN brltty-3.10~r3724/debian/brltty-udeb.udev.sh 
brltty-3.10~r3724.mine/debian/brltty-udeb.udev.sh
--- brltty-3.10~r3724/debian/brltty-udeb.udev.sh        1970-01-01 
01:00:00.000000000 +0100
+++ brltty-3.10~r3724.mine/debian/brltty-udeb.udev.sh   2008-10-06 
11:27:05.000000000 +0200
@@ -0,0 +1,3 @@
+#!/bin/sh
+grep -q brltty /proc/cmdline && exit 0
+exec /lib/brltty/brltty.sh "$@"
diff -urN brltty-3.10~r3724/debian/rules brltty-3.10~r3724.mine/debian/rules
--- brltty-3.10~r3724/debian/rules      2008-10-06 11:25:09.000000000 +0200
+++ brltty-3.10~r3724.mine/debian/rules 2008-10-06 11:53:44.000000000 +0200
@@ -174,6 +174,8 @@
        cp debian/brltty-udeb.init 
debian/$@/lib/debian-installer-startup.d/S37brltty
        chmod +x debian/$@/lib/debian-installer-startup.d/S37brltty
        cp debian/brltty-udeb.udev.rules debian/$@/etc/udev/rules.d/brltty.rules
+       cp debian/brltty-udeb.udev.sh debian/$@/lib/udev/brltty.sh
+       chmod +x debian/$@/lib/udev/brltty.sh
        cp debian/brltty-udeb.sh debian/$@/lib/brltty/brltty.sh
        chmod +x debian/$@/lib/brltty/brltty.sh
        dh_strip -p$@

Reply via email to