diff mbox

[rdma-core,4/5] srp_daemon: Move srp_daemon.service from the redhat directory to the srp_daemon directory

Message ID 20170515224733.29586-5-bart.vanassche@sandisk.com (mailing list archive)
State Superseded
Headers show

Commit Message

Bart Van Assche May 15, 2017, 10:47 p.m. UTC
Since this systemd unit file works fine on at least one other distro
(openSuSE), move it from the redhat/ directory into the srp_daemon/
directory. Move the code for installing this service from the Red Hat
RPM spec file into srp_daemon/CMakeLists.txt.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 redhat/rdma-core.spec                     | 3 ---
 srp_daemon/CMakeLists.txt                 | 2 ++
 {redhat => srp_daemon}/srp_daemon.service | 0
 3 files changed, 2 insertions(+), 3 deletions(-)
 rename {redhat => srp_daemon}/srp_daemon.service (100%)
diff mbox

Patch

diff --git a/redhat/rdma-core.spec b/redhat/rdma-core.spec
index 1095b2fc..993a6c80 100644
--- a/redhat/rdma-core.spec
+++ b/redhat/rdma-core.spec
@@ -273,9 +273,6 @@  bin/ib_acme -D . -O
 install -D -m0644 ibacm_opts.cfg %{buildroot}%{_sysconfdir}/rdma/
 install -D -m0644 redhat/ibacm.service %{buildroot}%{_unitdir}/
 
-# srp_daemon
-install -D -m0644 redhat/srp_daemon.service %{buildroot}%{_unitdir}/
-
 # Delete the package's init.d scripts
 rm -rf %{buildroot}/%{_initrddir}/
 
diff --git a/srp_daemon/CMakeLists.txt b/srp_daemon/CMakeLists.txt
index 726696ed..24e4c30d 100644
--- a/srp_daemon/CMakeLists.txt
+++ b/srp_daemon/CMakeLists.txt
@@ -27,6 +27,8 @@  rdma_subst_install(FILES "srp_daemon.sh.in"
 
 install(FILES srp_daemon.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}")
 
+install(FILES srp_daemon.service DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}")
+
 # FIXME: The ib init.d file should really be included in rdma-core as well.
 set(RDMA_SERVICE "openibd" CACHE STRING "init.d file service name to order srpd after")
 # NOTE: These defaults are for CentOS, packagers should override.
diff --git a/redhat/srp_daemon.service b/srp_daemon/srp_daemon.service
similarity index 100%
rename from redhat/srp_daemon.service
rename to srp_daemon/srp_daemon.service