Skip to content

Commit

Permalink
cmake: Add default for SYSTEMCTL_BIN option.
Browse files Browse the repository at this point in the history
[ Upstream commit cc340db ]

If systemctl is not found automatically, fallback to /bin/systemctl
This fixes a build issue on debian systems where the minimal chroot does
not contain systemd.

Fixes: 05a19e0 ("srp_daemon: Detect proper path to systemctl")
Reported-by: Benjamin Drung <benjamin.drung@ionos.com>
Signed-off-by: Nicolas Morey-Chaisemartin <nmoreychaisemartin@suse.com>
  • Loading branch information
nmorey committed Mar 28, 2022
1 parent d5f856f commit 09958c5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,9 @@ RDMA_BuildType()
include_directories(${BUILD_INCLUDE})

find_program(SYSTEMCTL_BIN systemctl HINTS "/usr/bin" "/bin")
if (NOT SYSTEMCTL_BIN)
set (SYSTEMCTL_BIN "/bin/systemctl")
endif()

RDMA_CheckSparse()

Expand Down

0 comments on commit 09958c5

Please sign in to comment.