@@ -1,4 +1,5 @@
etc/init.d/ibacm
+lib/systemd/system/ibacm.service
usr/bin/ib_acme
usr/include/infiniband/acm.h
usr/include/infiniband/acm_prov.h
@@ -64,3 +64,8 @@ rdma_subst_install(FILES "ibacm.init.in"
DESTINATION "${CMAKE_INSTALL_INITDDIR}"
RENAME "ibacm"
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
+
+rdma_subst_install(FILES "ibacm.service.in"
+ DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}"
+ RENAME ibacm.service
+ PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ)
new file mode 100644
@@ -0,0 +1,11 @@
+[Unit]
+Description=Starts the InfiniBand Address Cache Manager daemon
+Documentation=man:ibacm file:@CMAKE_INSTALL_SYSCONFDIR@/rdma/ibacm_opts.cfg
+After=opensm.service
+
+[Service]
+Type=forking
+ExecStart=@prefix@/sbin/ibacm
+
+[Install]
+WantedBy=network.target
deleted file mode 100644
@@ -1,12 +0,0 @@
-[Unit]
-Description=Starts the InfiniBand Address Cache Manager daemon
-Documentation=man:ibacm file:/etc/rdma/ibacm_opts.cfg
-Requires=rdma.service
-After=rdma.service opensm.service
-
-[Service]
-Type=forking
-ExecStart=/usr/sbin/ibacm
-
-[Install]
-WantedBy=network.target
@@ -271,7 +271,6 @@ install -D -m0755 redhat/rdma.mlx4-setup.sh %{buildroot}%{_libexecdir}/mlx4-setu
# ibacm
bin/ib_acme -D . -O
install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
-install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/
# Delete the package's init.d scripts
rm -rf %{buildroot}/%{_initrddir}/
ibacm ships only a sysvinit script but no corresponding systemd unit file. The RedHat package ships its own systemd unit file. Thus make it available to all. The ibacm service depends on sysinit.target (DefaultDependencies=yes) and the proposed rdma or rdma-load-modules services declare a dependency Before=sysinit.target. Thus the kernel modules will be loaded before the sysinit target and the ibacm service does not need to depend on (the not yet existing) rdma service. Signed-off-by: Benjamin Drung <benjamin.drung@profitbricks.com> --- debian/ibacm.install | 1 + ibacm/CMakeLists.txt | 5 +++++ ibacm/ibacm.service.in | 11 +++++++++++ redhat/ibacm.service | 12 ------------ redhat/rdma-core.spec | 1 - 5 files changed, 17 insertions(+), 13 deletions(-) create mode 100644 ibacm/ibacm.service.in delete mode 100644 redhat/ibacm.service