aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/rdma-core/rdma-core/0001-cmake-Allow-SYSTEMCTL_BIN-to-be-overridden-from-envi.patch
blob: e181ee2872831250a57d78034b7e71350d2cf281 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From 209f346d55eeaf74e21c541d70ec43d39b6c8c3c Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 27 May 2023 17:22:10 -0700
Subject: [PATCH] cmake: Allow SYSTEMCTL_BIN to be overridden from environment

This allows to encode correct paths which are inside the target rootfs
for systemctl

Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>

---
 CMakeLists.txt | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 98985e7ee..001efb800 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -237,7 +237,10 @@ else()
   endif()
 endif()
 
-find_program(SYSTEMCTL_BIN systemctl HINTS "/usr/bin" "/bin")
+if (NOT SYSTEMCTL_BIN)
+  find_program(SYSTEMCTL_BIN systemctl HINTS "/usr/bin" "/bin")
+endif()
+
 if (NOT SYSTEMCTL_BIN)
   set (SYSTEMCTL_BIN "/bin/systemctl")
 endif()