Skip to content

Commit

Permalink
iwpmd: Fix install path for iwpmd
Browse files Browse the repository at this point in the history
iwpmd is not user runnable, so it should be installed in sbin.

Also wrap-and-sort iwpmd.install

Signed-off-by: Jason Gunthorpe <jgunthorpe@obsidianresearch.com>
  • Loading branch information
jgunthorpe committed Jul 27, 2017
1 parent 9c071cb commit f387964
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
4 changes: 2 additions & 2 deletions debian/iwpmd.install
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
etc/init.d/iwpmd
etc/iwpmd.conf
lib/systemd/system/iwpmd.service
usr/bin/iwpmd
usr/share/man/man8/iwpmd.8
usr/sbin/iwpmd
usr/share/man/man5/iwpmd.conf.5
usr/share/man/man8/iwpmd.8
8 changes: 5 additions & 3 deletions iwpmd/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
rdma_executable(iwpmd
rdma_sbin_executable(iwpmd
iwarp_pm_common.c
iwarp_pm_helper.c
iwarp_pm_server.c
Expand All @@ -13,8 +13,10 @@ rdma_man_pages(
iwpmd.conf.5.in
)

install(FILES "iwpmd.service" DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}")
install(FILES "iwpmd_init"
rdma_subst_install(FILES "iwpmd.service.in"
RENAME "iwpmd.service"
DESTINATION "${CMAKE_INSTALL_SYSTEMD_SERVICEDIR}")
rdma_subst_install(FILES "iwpmd_init.in"
DESTINATION "${CMAKE_INSTALL_INITDDIR}"
RENAME "iwpmd"
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ OWNER_EXECUTE GROUP_EXECUTE WORLD_EXECUTE)
Expand Down
2 changes: 1 addition & 1 deletion iwpmd/iwpmd.service → iwpmd/iwpmd.service.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Documentation=man:iwpmd file:/etc/iwpmd.conf
After=network.target

[Service]
ExecStart=/usr/bin/iwpmd --systemd
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/iwpmd --systemd
LimitNOFILE=102400

[Install]
Expand Down
2 changes: 1 addition & 1 deletion iwpmd/iwpmd_init → iwpmd/iwpmd_init.in
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# Description: iWarp Port Mapper Daemon for opening sockets to claim TCP ports from userspace
### END INIT INFO

IWPMD_BIN="/usr/bin/iwpmd"
IWPMD_BIN="@CMAKE_INSTALL_FULL_SBINDIR@/iwpmd"
LOCK="/var/lock/subsys/iwpmd"
IWPMD_PID=0
RETVAL=0
Expand Down
2 changes: 1 addition & 1 deletion redhat/rdma-core.spec
Original file line number Diff line number Diff line change
Expand Up @@ -394,7 +394,7 @@ rm -rf %{buildroot}/%{_sbindir}/srp_daemon.sh
%doc %{_docdir}/%{name}-%{version}/ibacm.md

%files -n iwpmd
%{_bindir}/iwpmd
%{_sbindir}/iwpmd
%{_unitdir}/iwpmd.service
%config(noreplace) %{_sysconfdir}/iwpmd.conf
%{_mandir}/man8/iwpmd.*
Expand Down

0 comments on commit f387964

Please sign in to comment.