diff --git a/cmake/init_scripts.cmake b/cmake/init_scripts.cmake index 23ab7b8e5..83f8dd138 100644 --- a/cmake/init_scripts.cmake +++ b/cmake/init_scripts.cmake @@ -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) diff --git a/etc/fallback/maxscale.in b/etc/fallback/maxscale.in new file mode 100755 index 000000000..2b368861e --- /dev/null +++ b/etc/fallback/maxscale.in @@ -0,0 +1,4 @@ +#!/bin/sh + +echo "Init scripts are not supported on this platform, use either systemd or launch MaxScale manually" +exit 1