summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Evans <grknight@gentoo.org>2017-07-24 10:04:21 -0400
committerBrian Evans <grknight@gentoo.org>2017-07-24 10:04:21 -0400
commitd97f1c09eb25b28a65aedafa11a0c850a6438c7d (patch)
tree171932e305f765d278e1340a842c960545e6ce28 /dev-db/mysql-init-scripts
parentwww-client/seamonkey: Fixing support of external enigmail package. (diff)
downloadgentoo-d97f1c09eb25b28a65aedafa11a0c850a6438c7d.tar.gz
gentoo-d97f1c09eb25b28a65aedafa11a0c850a6438c7d.tar.bz2
gentoo-d97f1c09eb25b28a65aedafa11a0c850a6438c7d.zip
dev-db/mysql-init-scripts: Minor refinements to the 2.2 init scripts
Package-Manager: Portage-2.3.6, Repoman-2.3.3
Diffstat (limited to 'dev-db/mysql-init-scripts')
-rw-r--r--dev-db/mysql-init-scripts/files/init.d-2.210
-rw-r--r--dev-db/mysql-init-scripts/files/init.d-s6-2.212
2 files changed, 11 insertions, 11 deletions
diff --git a/dev-db/mysql-init-scripts/files/init.d-2.2 b/dev-db/mysql-init-scripts/files/init.d-2.2
index f798052bb37..d217744de9c 100644
--- a/dev-db/mysql-init-scripts/files/init.d-2.2
+++ b/dev-db/mysql-init-scripts/files/init.d-2.2
@@ -2,7 +2,11 @@
# Copyright 1999-2017 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-extra_commands="checkconfig bootstrap_galera"
+extra_commands="checkconfig"
+extra_stopped_commands="boostrap_galera"
+
+description_checkconfig="Verify the server's configuration"
+description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
depend() {
use net.lo
@@ -27,10 +31,6 @@ mysql_svcname() {
stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
bootstrap_galera() {
- if ! service_stopped ; then
- eerror "The server cannot be running to perform this action"
- return 1
- fi
MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
mark_service_starting
if start ; then
diff --git a/dev-db/mysql-init-scripts/files/init.d-s6-2.2 b/dev-db/mysql-init-scripts/files/init.d-s6-2.2
index 6e7bce3d9f1..427061aa990 100644
--- a/dev-db/mysql-init-scripts/files/init.d-s6-2.2
+++ b/dev-db/mysql-init-scripts/files/init.d-s6-2.2
@@ -25,13 +25,9 @@ mysql_svcname() {
stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
bootstrap_galera() {
- if ! service_stopped ; then
- eerror "The server cannot be running to perform this action"
- return 1
- fi
MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
mark_service_starting
- if start ; then
+ if start_pre && start ; then
mark_service_started
return 0
else
@@ -41,7 +37,11 @@ bootstrap_galera() {
}
-extra_commands="checkconfig boostrap_galera"
+extra_commands="checkconfig"
+extra_stopped_commands="boostrap_galera"
+
+description_checkconfig="Verify the server's configuration"
+description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
supervisor=s6
name=$(mysql_svcname)
s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))"