blob: 03ba872616ba27a9b5190ef3c6b06469862842b9 [file] [log] [blame]
Patrick Williamsb542dec2023-06-09 01:26:37 -05001From 92747aab189aa3cee954ab31ee019205f8984155 Mon Sep 17 00:00:00 2001
2From: Khem Raj <raj.khem@gmail.com>
3Date: Sat, 27 May 2023 17:22:10 -0700
4Subject: [PATCH] cmake: Allow SYSTEMCTL_BIN to be overridden from environment
5
6This allows to encode correct paths which are inside the target rootfs
7for systemctl
8
9Upstream-Status: Pending
10Signed-off-by: Khem Raj <raj.khem@gmail.com>
11---
12 CMakeLists.txt | 5 ++++-
13 1 file changed, 4 insertions(+), 1 deletion(-)
14
15diff --git a/CMakeLists.txt b/CMakeLists.txt
16index 9b7462861..c4d82fb49 100644
17--- a/CMakeLists.txt
18+++ b/CMakeLists.txt
19@@ -226,7 +226,10 @@ else()
20 set(CYTHON_EXECUTABLE "")
21 endif()
22
23-find_program(SYSTEMCTL_BIN systemctl HINTS "/usr/bin" "/bin")
24+if (NOT SYSTEMCTL_BIN)
25+ find_program(SYSTEMCTL_BIN systemctl HINTS "/usr/bin" "/bin")
26+endif()
27+
28 if (NOT SYSTEMCTL_BIN)
29 set (SYSTEMCTL_BIN "/bin/systemctl")
30 endif()
31--
322.40.1
33