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}")