[PATCH 10/13] ipathverbs: Move truescale-serdes.cmds to /usr/libexec/

Jason Gunthorpe
2016-09-23T19:17:05Z

This is the FHS defined place for non-user runnable helper
programs.

Debian forbids the use of /usr/libexec/ so we provide
substitution support to let cmake customize this.

Signed-off-by: Jason Gunthorpe <jgunthorpe-ePGOBjL8dl3ta4EC/59zMFaTQe2KTcn/@public.gmane.org>
---
libipathverbs/CMakeLists.txt | 6 ++++--
libipathverbs/dracut_install | 2 +-
libipathverbs/truescale.conf | 1 -
libipathverbs/truescale.conf.in | 1 +
4 files changed, 6 insertions(+), 4 deletions(-)
delete mode 100644 libipathverbs/truescale.conf
create mode 100644 libipathverbs/truescale.conf.in

diff --git a/libipathverbs/CMakeLists.txt b/libipathverbs/CMakeLists.txt
index 359438ef0e49..bde405d0d776 100644
--- a/libipathverbs/CMakeLists.txt
+++ b/libipathverbs/CMakeLists.txt
@@ -1,4 +1,6 @@
-install(FILES truescale.conf DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/modprobe.d/")
+rdma_subst_install(FILES "truescale.conf.in"
+ DESTINATION "${CMAKE_INSTALL_SYSCONFDIR}/modprobe.d/"
+ RENAME "truescale.conf")
install(FILES truescale-serdes.cmds
- DESTINATION "${CMAKE_INSTALL_SBINDIR}"
+ DESTINATION "${CMAKE_INSTALL_LIBEXECDIR}"
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
diff --git a/libipathverbs/dracut_install b/libipathverbs/dracut_install
index 131adfa036b8..a7ef490ea40f 100644
--- a/libipathverbs/dracut_install
+++ b/libipathverbs/dracut_install
@@ -1,7 +1,7 @@
#!/bin/bash

inst /etc/modprobe.d/truescale.conf
-inst /usr/sbin/truescale-serdes.cmds
+inst /usr/libexec/truescale-serdes.cmds

# All files needed by truescale-serdes.cmds need to be present here
inst /sbin/lspci
diff --git a/libipathverbs/truescale.conf b/libipathverbs/truescale.conf
deleted file mode 100644
index 8ed227c91f86..000000000000
diff --git a/libipathverbs/truescale.conf.in b/libipathverbs/truescale.conf.in
new file mode 100644
index 000000000000..e2827d956015
--- /dev/null
+++ b/libipathverbs/truescale.conf.in
@@ -0,0 +1 @@
+install ib_qib modprobe -i ib_qib $CMDLINE_OPTS && @CMAKE_INSTALL_FULL_LIBEXECDIR@/truescale-serdes.cmds start
--
2.1.4