blob: a178f327570efbcbd564e1aba2c339161ee6b3b7 [file] [log] [blame]
Makes the udev rules run a script to start brltty instead of just
running it directly. Also fixes the names of the brltty environment
variables in the section of this file that is not autogenerated.
The latter is already on brltty trunk.
--- a/Hotplug/udev.rules
+++ b/Hotplug/udev.rules
@@ -283,18 +283,18 @@
GOTO="brltty_end"
LABEL="brltty_usb_run"
-ENV{BRLTTY_DEVICE}="usb:$sysfs{serial}"
+ENV{BRLTTY_BRAILLE_DEVICE}="usb:$sysfs{serial}"
GOTO="brltty_run"
LABEL="brltty_run"
-ENV{BRLTTY_PID_FILE}="/var/run/brltty.$kernel.pid"
-ACTION=="add", GOTO="brltty_add"
+ENV{BRLTTY_PID_FILE}="/var/run/brltty/brltty.$kernel.pid"
+ACTION=="add|change", GOTO="brltty_add"
ACTION=="remove", GOTO="brltty_remove"
GOTO="brltty_end"
LABEL="brltty_add"
-SYMLINK+="brltty/$env{BRLTTY_DRIVER}-$env{BRLTTY_DEVICE}"
-RUN+="/bin/brltty -E -P$env{BRLTTY_PID_FILE}"
+SYMLINK+="brltty/$env{BRLTTY_BRAILLE_DRIVER}-$env{BRLTTY_BRAILLE_DEVICE}"
+RUN+="/lib/udev/brltty"
GOTO="brltty_end"
LABEL="brltty_remove"