mirror of
https://github.com/MariaDB/server.git
synced 2026-05-15 19:37:16 +02:00
remove bash-ish from SST scripts
replace with awk (yuck!), avoiding gensub (which wasn't recognized)
This commit is contained in:
parent
00855a62ab
commit
b4fbb4183b
1 changed files with 1 additions and 7 deletions
|
|
@ -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#*/}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue