diff mbox

[rdma-core,18/21] srp_daemon: Call systemctl properly from udev

Message ID 1500926429-31822-19-git-send-email-jgunthorpe@obsidianresearch.com (mailing list archive)
State Accepted
Headers show

Commit Message

Jason Gunthorpe July 24, 2017, 8 p.m. UTC
Use /bin/ as the call path for systemctl. For some reason Debian
derived distros do not have /usr/bin/systemctl, only /bin/systemctl.
Other distros seem to have both paths.

Also invoke PROGRAM using == which matches what the udev test suite does.

Fixes: d35e5c4f7169 ("srp_daemon.service: Add support for hot-plugging")
Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
---
 srp_daemon/srp_daemon.rules | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox

Patch

diff --git a/srp_daemon/srp_daemon.rules b/srp_daemon/srp_daemon.rules
index 6780d5421de7b4..4cfeabc762da2a 100644
--- a/srp_daemon/srp_daemon.rules
+++ b/srp_daemon/srp_daemon.rules
@@ -1 +1 @@ 
-ACTION=="add", SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", PROGRAM:="/usr/bin/systemctl show srp_daemon -p ActiveState", RESULT=="ActiveState=active", ENV{SYSTEMD_WANTS}+="srp_daemon_port@$attr{ibdev}:$attr{port}.service"
+ACTION=="add", SUBSYSTEM=="infiniband_mad", KERNEL=="*umad*", PROGRAM=="/bin/systemctl show srp_daemon -p ActiveState", RESULT=="ActiveState=active", ENV{SYSTEMD_WANTS}+="srp_daemon_port@$attr{ibdev}:$attr{port}.service"