[BRLTTY] udev with systemd

Mike Gorse mgorse at alum.wpi.edu
Thu Jan 7 16:32:29 EST 2016


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
-------------- next part --------------
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"
 


More information about the BRLTTY mailing list