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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47
|
Description: Generate sysvinit config
Despite FORCE_INIT_SYSTEM being a list upstream later in the code considers it
a single value. Not sure what to suggest that would be accepted upstream but
in the meanwhile this works.
Author: Marc Dequènes (Duck) <Duck@DuckCorp.org>
Last-Update: 2022-02-09
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/src/daemon/CMakeLists.txt
+++ b/src/daemon/CMakeLists.txt
@@ -404,16 +404,15 @@
endif ()
# A way to check for SysVinit
- # Fall back to this only if any of the above haven't been found
- if ((EXISTS "/etc/inittab" AND EXISTS "/lib/lsb/init-functions" AND NOT DISALLOW_SYSVINIT) OR "sysvinit" IN_LIST FORCE_INIT_SYSTEM)
+ if ((EXISTS "/etc/inittab" AND EXISTS "/lib/lsb/init-functions") OR "sysvinit" IN_LIST FORCE_INIT_SYSTEM)
message(STATUS "SysVinit detected")
- set(CKB_NEXT_INIT_SYSTEM "SysVinit" CACHE INTERNAL "")
+ #set(CKB_NEXT_INIT_SYSTEM "SysVinit" CACHE INTERNAL "")
# Generate and import service
message(STATUS "Generating and importing ckb-next-daemon (${CKB_NEXT_INIT_SYSTEM})")
configure_file(
"${ckb-next_SOURCE_DIR}/linux/sysvinit/ckb-next-daemon.in"
- "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon.sh"
+ "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon"
@ONLY)
if (SAFE_INSTALL)
@@ -491,6 +490,16 @@
Supported services are: systemd, launchd, OpenRC, upstart, SysVinit.")
endif ()
+if ("sysvinit" IN_LIST FORCE_INIT_SYSTEM)
+ install(
+ FILES "${CMAKE_CURRENT_BINARY_DIR}/service/ckb-next-daemon"
+ DESTINATION "/etc/init.d"
+ PERMISSIONS
+ OWNER_READ OWNER_WRITE OWNER_EXECUTE
+ GROUP_READ GROUP_EXECUTE
+ WORLD_READ WORLD_EXECUTE)
+endif ()
+
if (LINUX)
if (SAFE_INSTALL)
install(CODE "
|