Gentoo Archives: gentoo-commits

From: Brian Evans <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: dev-db/mysql-init-scripts/files/
Date: Mon, 24 Jul 2017 14:04:34
Message-Id: 1500905061.d97f1c09eb25b28a65aedafa11a0c850a6438c7d.grknight@gentoo
1 commit: d97f1c09eb25b28a65aedafa11a0c850a6438c7d
2 Author: Brian Evans <grknight <AT> gentoo <DOT> org>
3 AuthorDate: Mon Jul 24 14:04:21 2017 +0000
4 Commit: Brian Evans <grknight <AT> gentoo <DOT> org>
5 CommitDate: Mon Jul 24 14:04:21 2017 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d97f1c09
7
8 dev-db/mysql-init-scripts: Minor refinements to the 2.2 init scripts
9
10 Package-Manager: Portage-2.3.6, Repoman-2.3.3
11
12 dev-db/mysql-init-scripts/files/init.d-2.2 | 10 +++++-----
13 dev-db/mysql-init-scripts/files/init.d-s6-2.2 | 12 ++++++------
14 2 files changed, 11 insertions(+), 11 deletions(-)
15
16 diff --git a/dev-db/mysql-init-scripts/files/init.d-2.2 b/dev-db/mysql-init-scripts/files/init.d-2.2
17 index f798052bb37..d217744de9c 100644
18 --- a/dev-db/mysql-init-scripts/files/init.d-2.2
19 +++ b/dev-db/mysql-init-scripts/files/init.d-2.2
20 @@ -2,7 +2,11 @@
21 # Copyright 1999-2017 Gentoo Foundation
22 # Distributed under the terms of the GNU General Public License v2
23
24 -extra_commands="checkconfig bootstrap_galera"
25 +extra_commands="checkconfig"
26 +extra_stopped_commands="boostrap_galera"
27 +
28 +description_checkconfig="Verify the server's configuration"
29 +description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
30
31 depend() {
32 use net.lo
33 @@ -27,10 +31,6 @@ mysql_svcname() {
34 stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
35
36 bootstrap_galera() {
37 - if ! service_stopped ; then
38 - eerror "The server cannot be running to perform this action"
39 - return 1
40 - fi
41 MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
42 mark_service_starting
43 if start ; then
44
45 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
46 index 6e7bce3d9f1..427061aa990 100644
47 --- a/dev-db/mysql-init-scripts/files/init.d-s6-2.2
48 +++ b/dev-db/mysql-init-scripts/files/init.d-s6-2.2
49 @@ -25,13 +25,9 @@ mysql_svcname() {
50 stringContain() { [ -z "${2##*$1*}" ] && [ -z "$1" -o -n "$2" ]; }
51
52 bootstrap_galera() {
53 - if ! service_stopped ; then
54 - eerror "The server cannot be running to perform this action"
55 - return 1
56 - fi
57 MY_ARGS="--wsrep-new-cluster ${MY_ARGS}"
58 mark_service_starting
59 - if start ; then
60 + if start_pre && start ; then
61 mark_service_started
62 return 0
63 else
64 @@ -41,7 +37,11 @@ bootstrap_galera() {
65 }
66
67
68 -extra_commands="checkconfig boostrap_galera"
69 +extra_commands="checkconfig"
70 +extra_stopped_commands="boostrap_galera"
71 +
72 +description_checkconfig="Verify the server's configuration"
73 +description_boostrap_galera="Start a new Galera cluster with this server as the initial node"
74 supervisor=s6
75 name=$(mysql_svcname)
76 s6_service_timeout_stop="$((1000*${STOP_TIMEOUT:-120}))"