MDEV-35850 make HOSTNAME a cmake configure variable

As seen with openwrt and some other distros, the
determination of hostname can sometime need alternate
commmands.

This provides a cmake option HOSTNAME for non-windows machines
for the mariadb-install-db and mariadbd-safe scripts
and the support-files init scripts..
This commit is contained in:
Daniel Black
2025-01-15 09:18:12 +11:00
parent c94133a71d
commit da5a4d05b9
3 changed files with 1 additions and 2 deletions

View File

@ -379,6 +379,7 @@ IF(WIN32)
ELSE()
SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX})
SET(SHAREDIR ${INSTALL_MYSQLSHAREDIRABS})
SET(HOSTNAME "uname -n" CACHE STRING "Command for determining hostname")
ENDIF()
SET(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")

View File

@ -177,7 +177,6 @@ ELSE()
SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
ENDIF()
SET(HOSTNAME "uname -n")
SET(MYSQLD_USER "mysql")
SET(MYSQLD_GROUP "mysql")
ENDIF(UNIX)

View File

@ -31,7 +31,6 @@ ELSE()
SET(MYSQLD_USER "mysql")
SET(MYSQLD_GROUP "mysql")
SET(ini_file_extension "cnf")
SET(HOSTNAME "uname -n")
# Define directly here, as cmake/install_layout.cmake has no LOGDIR to be inherited
SET(su_user "su mysql mysql")