Skip to content

Commit da5a4d0

Browse files
committed
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..
1 parent c94133a commit da5a4d0

File tree

3 files changed

+1
-2
lines changed

3 files changed

+1
-2
lines changed

CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,6 +379,7 @@ IF(WIN32)
379379
ELSE()
380380
SET(DEFAULT_MYSQL_HOME ${CMAKE_INSTALL_PREFIX})
381381
SET(SHAREDIR ${INSTALL_MYSQLSHAREDIRABS})
382+
SET(HOSTNAME "uname -n" CACHE STRING "Command for determining hostname")
382383
ENDIF()
383384

384385
SET(DEFAULT_BASEDIR "${DEFAULT_MYSQL_HOME}")

scripts/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,6 @@ ELSE()
177177
SET(CHECK_PID "kill -s SIGCONT $PID > /dev/null 2> /dev/null")
178178
ENDIF()
179179

180-
SET(HOSTNAME "uname -n")
181180
SET(MYSQLD_USER "mysql")
182181
SET(MYSQLD_GROUP "mysql")
183182
ENDIF(UNIX)

support-files/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ ELSE()
3131
SET(MYSQLD_USER "mysql")
3232
SET(MYSQLD_GROUP "mysql")
3333
SET(ini_file_extension "cnf")
34-
SET(HOSTNAME "uname -n")
3534

3635
# Define directly here, as cmake/install_layout.cmake has no LOGDIR to be inherited
3736
SET(su_user "su mysql mysql")

0 commit comments

Comments
 (0)