Skip to content

Commit 48e6918

Browse files
committed
Revert "update galera_new_cluster to use environment file"
This reverts commit b54e4bf.
1 parent 277968a commit 48e6918

File tree

3 files changed

+2
-20
lines changed

3 files changed

+2
-20
lines changed

scripts/CMakeLists.txt

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -190,9 +190,6 @@ ELSE()
190190
SET(localstatedir ${MYSQL_DATADIR})
191191
ENDIF()
192192

193-
get_filename_component(MYSQL_UNIX_DIR ${MYSQL_UNIX_ADDR} DIRECTORY)
194-
SET(mysqlunixdir ${MYSQL_UNIX_DIR})
195-
196193
SET(resolveip_locations "$basedir/${INSTALL_BINDIR} $basedir/bin")
197194
SET(mysqld_locations "$basedir/${INSTALL_SBINDIR} $basedir/libexec $basedir/sbin $basedir/bin")
198195
SET(errmsg_locations "$basedir/${INSTALL_MYSQLSHAREDIR}/english $basedir/share/english $basedir/share/mysql/english")
@@ -210,18 +207,6 @@ INSTALL_SCRIPT(
210207
DESTINATION ${INSTALL_SCRIPTDIR}
211208
COMPONENT Server
212209
)
213-
214-
CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/galera_new_cluster.sh
215-
${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster ESCAPE_QUOTES @ONLY)
216-
EXECUTE_PROCESS(
217-
COMMAND chmod +x ${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster
218-
)
219-
220-
INSTALL_SCRIPT(
221-
"${CMAKE_CURRENT_BINARY_DIR}/galera_new_cluster"
222-
DESTINATION ${INSTALL_SCRIPTDIR}
223-
COMPONENT Server
224-
)
225210
ENDIF()
226211

227212
SET(prefix "${CMAKE_INSTALL_PREFIX}")

scripts/galera_new_cluster.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ EOF
2121
exit 0
2222
fi
2323

24-
echo _WSREP_NEW_CLUSTER='--wsrep-new-cluster' > @mysqlunixdir@/"wsrep-new-cluster-${1:-mariadb}" && \
24+
systemctl set-environment _WSREP_NEW_CLUSTER='--wsrep-new-cluster' && \
2525
systemctl restart ${1:-mariadb}
2626

2727
extcode=$?
2828

29-
rm -f @mysqlunixdir@/"wsrep-new-cluster-${1:-mariadb}"
29+
systemctl set-environment _WSREP_NEW_CLUSTER=''
3030

3131
exit $extcode

support-files/mariadb.service.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,6 @@ ProtectSystem=full
7070
# Prevent accessing /home, /root and /run/user
7171
ProtectHome=true
7272

73-
# Use an environment file to pass variable _WSREP_NEW_CLUSTER
74-
EnvironmentFile=-@mysqlunixdir@/wsrep-new-cluster-%N
75-
7673
# Use an environment file to pass variable _WSREP_START_POSITION
7774
EnvironmentFile=-@mysqlunixdir@/wsrep-start-position
7875

0 commit comments

Comments
 (0)