diff options
author | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 11:49:26 +0100 |
---|---|---|
committer | Sergei Golubchik <serg@mariadb.org> | 2018-02-06 14:52:01 +0100 |
commit | b4fbb4183b35f921efe079a312b0c1be87866b40 (patch) | |
tree | e1f19f77d989a820f732d0181114463930b771c7 /scripts | |
parent | 00855a62aba1afd9a7157ca29e0c2bc9476cb66c (diff) | |
download | mariadb-git-b4fbb4183b35f921efe079a312b0c1be87866b40.tar.gz |
remove bash-ish from SST scripts
replace with awk (yuck!), avoiding gensub (which wasn't recognized)
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/wsrep_sst_common.sh | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/scripts/wsrep_sst_common.sh b/scripts/wsrep_sst_common.sh index a18a2520e12..edf7b2d71aa 100644 --- a/scripts/wsrep_sst_common.sh +++ b/scripts/wsrep_sst_common.sh @@ -36,13 +36,7 @@ case "$1" in # Break address string into host:port/path parts # readonly WSREP_SST_OPT_HOST=${WSREP_SST_OPT_ADDR%%[:/]*} - if [ ${WSREP_SST_OPT_HOST:0:1} = '[' ] - then - # IPv6 notation - readonly WSREP_SST_OPT_HOST_UNESCAPED=${WSREP_SST_OPT_HOST:1:-1} - else - readonly WSREP_SST_OPT_HOST_UNESCAPED=${WSREP_SST_OPT_HOST} - fi + readonly WSREP_SST_OPT_HOST_UNESCAPED=`echo "$WSREP_SST_OPT_HOST"|awk '{if(match($0,/^\[.*\]$/)) $0=substr($0,2,RLENGTH-2);print}'` readonly WSREP_SST_OPT_ADDR_PORT=$(echo $WSREP_SST_OPT_ADDR | \ cut -d ']' -f 2 | cut -s -d ':' -f 2 | cut -d '/' -f 1) readonly WSREP_SST_OPT_PATH=${WSREP_SST_OPT_ADDR#*/} |