File tree Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Expand file tree Collapse file tree 2 files changed +17
-2
lines changed Original file line number Diff line number Diff line change @@ -206,6 +206,9 @@ ELSE()
206206 SET (localstatedir ${MYSQL_DATADIR} )
207207ENDIF ()
208208
209+ get_filename_component (MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY )
210+ SET (mysqlunixdir ${MYSQL_UNIX_DIR} )
211+
209212SET (resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin" )
210213SET (mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin" )
211214SET (errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR} /english $basedir/share/english $basedir/share/mariadb/english $basedir/share/mysql/english" )
@@ -224,6 +227,18 @@ IF(UNIX AND NOT WITHOUT_SERVER)
224227 COMPONENT Server)
225228
226229 INSTALL_LINK(mariadb-install -db mysql_install_db ${INSTALL_SCRIPTDIR} ServerSymlinks)
230+
231+ CONFIGURE_FILE (${CMAKE_CURRENT_SOURCE_DIR} /galera_new_cluster.sh
232+ ${CMAKE_CURRENT_BINARY_DIR} /galera_new_cluster ESCAPE_QUOTES @ONLY)
233+ EXECUTE_PROCESS (
234+ COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR} /galera_new_cluster
235+ )
236+
237+ INSTALL_SCRIPT(
238+ "${CMAKE_CURRENT_BINARY_DIR} /galera_new_cluster"
239+ DESTINATION ${INSTALL_SCRIPTDIR}
240+ COMPONENT Server
241+ )
227242ENDIF ()
228243
229244SET (prefix "${CMAKE_INSTALL_PREFIX} " )
Original file line number Diff line number Diff line change 2121 exit 0
2222fi
2323
24- systemctl set-environment _WSREP_NEW_CLUSTER=' --wsrep-new-cluster' && \
24+ echo _WSREP_NEW_CLUSTER=' --wsrep-new-cluster' > @mysqlunixdir@/ " wsrep-new-cluster " && \
2525 systemctl restart ${1:- mariadb}
2626
2727extcode=$?
2828
29- systemctl set-environment _WSREP_NEW_CLUSTER= ' '
29+ rm -f @mysqlunixdir@/ " wsrep-new-cluster "
3030
3131exit $extcode
You can’t perform that action at this time.
0 commit comments