Fix SLES 15 packaging
SLES 15 doesn't have any sort of init functions which is why the error is converted to a status message. A dummy file that just prints an error is placed into /etc/init.d/ to make it clear to the users that they should use systemd to start MaxScale.
This commit is contained in:
@ -10,7 +10,7 @@ elseif(EXISTS ${SLES_FNC})
|
||||
elseif(EXISTS ${DEB_FNC})
|
||||
set(USE_DEB TRUE CACHE BOOL "If init.d script uses /lib/lsb/init-functions instead of /etc/rc.d/init.d/functions.")
|
||||
else()
|
||||
message(FATAL_ERROR "Cannot find required init-functions in /lib/lsb/ or /etc/rc.d/init.d/, please confirm that your system files are OK.")
|
||||
message(STATUS "Cannot find required init-functions in /lib/lsb/ or /etc/rc.d/init.d/, will not install init scripts.")
|
||||
endif()
|
||||
|
||||
if(USE_DEB)
|
||||
@ -18,7 +18,10 @@ if(USE_DEB)
|
||||
elseif(USE_RPM)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/etc/init.d/maxscale.in ${CMAKE_BINARY_DIR}/maxscale @ONLY)
|
||||
elseif(USE_SLES)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/etc/sles11/init.d/maxscale.in ${CMAKE_BINARY_DIR}/maxscale @ONLY)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/etc/sles11/init.d/maxscale.in ${CMAKE_BINARY_DIR}/maxscale @ONLY)
|
||||
else()
|
||||
# Use a dummy file that tells the user that init scripts aren't supported on this platform
|
||||
configure_file(${CMAKE_SOURCE_DIR}/etc/fallback/maxscale.in ${CMAKE_BINARY_DIR}/maxscale @ONLY)
|
||||
endif()
|
||||
|
||||
configure_file(${CMAKE_SOURCE_DIR}/etc/maxscale.conf.in ${CMAKE_BINARY_DIR}/maxscale.conf @ONLY)
|
||||
|
4
etc/fallback/maxscale.in
Executable file
4
etc/fallback/maxscale.in
Executable file
@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
echo "Init scripts are not supported on this platform, use either systemd or launch MaxScale manually"
|
||||
exit 1
|
Reference in New Issue
Block a user