Gentoo Archives: gentoo-commits

From: "Brian Evans (grknight)" <grknight@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-cluster/galera/files: garb.sh
Date: Fri, 31 Oct 2014 22:06:17
Message-Id: 20141031220610.97ED492B1@oystercatcher.gentoo.org
1 grknight 14/10/31 22:06:10
2
3 Modified: garb.sh
4 Log:
5 Refine enewuser command and remove bashisms; Thanks to dcmwai in IRC for feedback
6
7 (Portage version: 2.2.8-r2/cvs/Linux x86_64, signed Manifest commit with key 67C78E1D)
8
9 Revision Changes Path
10 1.2 sys-cluster/galera/files/garb.sh
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.sh?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.sh?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/galera/files/garb.sh?r1=1.1&r2=1.2
15
16 Index: garb.sh
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-cluster/galera/files/garb.sh,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -u -r1.1 -r1.2
22 --- garb.sh 30 Jul 2014 06:26:05 -0000 1.1
23 +++ garb.sh 31 Oct 2014 22:06:10 -0000 1.2
24 @@ -25,13 +25,13 @@
25 for ADDRESS in ${GALERA_NODES} 0; do
26 HOST=$(echo $ADDRESS | cut -d \: -f 1 )
27 PORT=$(echo $ADDRESS | cut -d \: -f 2 )
28 - if [[ "${HOST}" == "${PORT}" ]]; then
29 + if [ "x${HOST}" = "x${PORT}" ]; then
30 PORT=${GALERA_PORT}
31 fi
32 PORT=${PORT:-$GALERA_PORT}
33 nc -z ${HOST} ${PORT} > /dev/null && break
34 done
35 - if [ ${ADDRESS} == "0" ]; then
36 + if [ ${ADDRESS} = "0" ]; then
37 eerror "None of the nodes in GALERA_NODES is accessible"
38 return 1
39 fi