On Thu, 7 Jan 2016, Dave Mielke wrote:

I udnerstand the patch. The problem is that we need to add to it a test so that
the rules will still work when systemd isn't being used.

I've updated the patch. See attached. It should have no effect if systemd isn't being used.

Thanks,
-Mike
diff --git a/Autostart/Udev/udev.rules b/Autostart/Udev/udev.rules
index 095ae12..131dcbe 100644
--- a/Autostart/Udev/udev.rules
+++ b/Autostart/Udev/udev.rules
@@ -442,10 +442,16 @@ GOTO="brltty_end"
 
 LABEL="brltty_add"
 SYMLINK+="brltty/$env{BRLTTY_BRAILLE_DRIVER}-$env{BRLTTY_BRAILLE_DEVICE}"
+PROGRAM="/usr/bin/mountpoint -q /sys/fs/cgroup/systemd", 
GOTO="brltty_add_systemd"
 RUN+="/bin/brltty -E -P$env{BRLTTY_PID_FILE}"
 GOTO="brltty_end"
 
+LABEL="brltty_add_systemd"
+TAG+="systemd", ENV{SYSTEMD_WANTS}+="brltty.service"
+GOTO="brltty_end"
+
 LABEL="brltty_remove"
+PROGRAM="/usr/bin/mountpoint -q /sys/fs/cgroup/systemd", GOTO="brltty_end"
 RUN+="/bin/sh -c 'kill -TERM `cat $env{BRLTTY_PID_FILE}`'"
 GOTO="brltty_end"
 
_______________________________________________
This message was sent via the BRLTTY mailing list.
To post a message, send an e-mail to: BRLTTY@mielke.cc
For general information, go to: http://mielke.cc/mailman/listinfo/brltty

Reply via email to