forked from linux-rdma/rdma-core
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request linux-rdma#176 from jgunthorpe/ibacm
Sytemd integration for ibacm
- Loading branch information
Showing
14 changed files
with
150 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
# COPYRIGHT (c) 2015 Obsidian Research Corporation. | ||
# Licensed under BSD (MIT variant) or GPLv2. See COPYING. | ||
|
||
find_path(LIBSYSTEMD_INCLUDE_DIRS "systemd/sd-journal.h") | ||
|
||
if (LIBSYSTEMD_INCLUDE_DIRS) | ||
set(SYSTEMD_INCLUDE_DIRS ${LIBSYSTEMD_INCLUDE_DIRS}) | ||
find_library(LIBSYSTEMD_LIBRARY NAMES systemd libsystemd) | ||
# Older systemd uses a split library | ||
if (NOT LIBSYSTEMD_LIBRARY) | ||
find_library(LIBSYSTEMD_JOURNAL_LIBRARY NAMES systemd-journal libsystemd-journal) | ||
find_library(LIBSYSTEMD_ID128_LIBRARY NAMES systemd-id128 libsystemd-id128) | ||
find_library(LIBSYSTEMD_DAEMON_LIBRARY NAMES systemd-daemon libsystemd-daemon) | ||
|
||
if (LIBSYSTEMD_JOURNAL_LIBRARY AND LIBSYSTEMD_ID128_LIBRARY AND LIBSYSTEMD_DAEMON_LIBRARY) | ||
set(SYSTEMD_LIBRARIES | ||
${LIBSYSTEMD_JOURNAL_LIBRARY} | ||
${LIBSYSTEMD_ID128_LIBRARY} | ||
${LIBSYSTEMD_DAEMON_LIBRARY}) | ||
endif() | ||
else() | ||
set(SYSTEMD_LIBRARIES ${LIBSYSTEMD_LIBRARY}) | ||
endif() | ||
set(SYSTEMD_INCLUDE_DIRS) | ||
endif() | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(Systemd REQUIRED_VARS SYSTEMD_LIBRARIES LIBSYSTEMD_INCLUDE_DIRS) | ||
|
||
mark_as_advanced(LIBSYSTEMD_LIBRARY LIBSYSTEMD_JOURNAL_LIBRARY LIBSYSTEMD_ID128_LIBRARY LIBSYSTEMD_DAEMON_LIBRARY) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#define SD_LISTEN_FDS_START 3 | ||
|
||
static inline int sd_listen_fds(int unset_environment) | ||
{ | ||
return 0; | ||
} | ||
|
||
static inline int sd_is_socket(int fd, int family, int type, int listening) | ||
{ | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,12 @@ | ||
[Unit] | ||
Description=Starts the InfiniBand Address Cache Manager daemon | ||
Description=InfiniBand Address Cache Manager Daemon | ||
Documentation=man:ibacm file:@CMAKE_INSTALL_SYSCONFDIR@/rdma/ibacm_opts.cfg | ||
After=opensm.service | ||
Wants=ibacm.socket | ||
|
||
[Service] | ||
Type=forking | ||
ExecStart=@prefix@/sbin/ibacm | ||
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/ibacm --systemd | ||
|
||
[Install] | ||
Also=ibacm.socket | ||
WantedBy=network.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
[Unit] | ||
Description=Socket for InfiniBand Address Cache Manager Daemon | ||
Documentation=man:ibacm | ||
|
||
[Socket] | ||
ListenStream=6125 | ||
BindToDevice=lo | ||
|
||
[Install] | ||
WantedBy=sockets.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.