diff mbox

[PATCHv2,rdma-core,1/5] kernel-boot: Add cmake variable to configure the path to systemd-* binaries

Message ID 78ca92c2-8422-e22d-1efa-1077946d2064@suse.de (mailing list archive)
State Accepted
Headers show

Commit Message

Nicolas Morey-Chaisemartin Aug. 25, 2017, 10:40 a.m. UTC
Debian uses /lib/systemd
SUSE uses /usr/lib/systemd
RHEL/Fedora can use both.

Signed-off-by: Nicolas Morey-Chaisemartin <NMoreyChaisemartin@suse.com>
---
 CMakeLists.txt                            | 2 ++
 kernel-boot/rdma-load-modules@.service.in | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
diff mbox

Patch

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 2324cf49..a2464ec5 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -74,6 +74,8 @@  set(CMAKE_INSTALL_INITDDIR "${CMAKE_INSTALL_SYSCONFDIR}/init.d"
   CACHE PATH "Location for init.d files")
 set(CMAKE_INSTALL_SYSTEMD_SERVICEDIR "${CMAKE_INSTALL_PREFIX}/lib/systemd/system"
   CACHE PATH "Location for systemd service files")
+set(CMAKE_INSTALL_SYSTEMD_BINDIR "/lib/systemd"
+  CACHE PATH "Location for systemd extra binaries")
 
 set(ACM_PROVIDER_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/ibacm"
   CACHE PATH "Location for ibacm provider plugin shared library files.")
diff --git a/kernel-boot/rdma-load-modules@.service.in b/kernel-boot/rdma-load-modules@.service.in
index d381bc5b..c390a8cc 100644
--- a/kernel-boot/rdma-load-modules@.service.in
+++ b/kernel-boot/rdma-load-modules@.service.in
@@ -21,5 +21,5 @@  ConditionCapability=CAP_SYS_MODULE
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=/lib/systemd/systemd-modules-load @CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma/modules/%I.conf
+ExecStart=@CMAKE_INSTALL_SYSTEMD_BINDIR@/systemd-modules-load @CMAKE_INSTALL_FULL_SYSCONFDIR@/rdma/modules/%I.conf
 TimeoutSec=90s