summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_xtrabackup.sh
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/wsrep_sst_xtrabackup.sh')
-rw-r--r--scripts/wsrep_sst_xtrabackup.sh20
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/wsrep_sst_xtrabackup.sh b/scripts/wsrep_sst_xtrabackup.sh
index 044f9995580..7279c623288 100644
--- a/scripts/wsrep_sst_xtrabackup.sh
+++ b/scripts/wsrep_sst_xtrabackup.sh
@@ -61,7 +61,6 @@ pcmd="pv $pvopts"
declare -a RC
INNOBACKUPEX_BIN=innobackupex
-readonly AUTH=(${WSREP_SST_OPT_AUTH//:/ })
DATA="${WSREP_SST_OPT_DATA}"
INFO_FILE="xtrabackup_galera_info"
IST_FILE="xtrabackup_ist"
@@ -150,7 +149,11 @@ get_transfer()
fi
wsrep_log_info "Using netcat as streamer"
if [[ "$WSREP_SST_OPT_ROLE" == "joiner" ]];then
- tcmd="nc -dl ${TSST_PORT}"
+ if nc -h | grep -q ncat;then
+ tcmd="nc -l ${TSST_PORT}"
+ else
+ tcmd="nc -dl ${TSST_PORT}"
+ fi
else
tcmd="nc ${REMOTEIP} ${TSST_PORT}"
fi
@@ -435,13 +438,14 @@ then
then
TMPDIR="${TMPDIR:-/tmp}"
- if [ "${AUTH[0]}" != "(null)" ]; then
- INNOEXTRA+=" --user=${AUTH[0]}"
- fi
+ if [ "$WSREP_SST_OPT_USER" != "(null)" ]; then
+ INNOEXTRA+=" --user=$WSREP_SST_OPT_USER"
+ fi
- if [ ${#AUTH[*]} -eq 2 ]; then
- INNOEXTRA+=" --password=${AUTH[1]}"
- elif [ "${AUTH[0]}" != "(null)" ]; then
+ if [ -n "$WSREP_SST_OPT_PSWD" ]; then
+# INNOEXTRA+=" --password=$WSREP_SST_OPT_PSWD"
+ export MYSQL_PWD="$WSREP_SST_OPT_PSWD"
+ else
# Empty password, used for testing, debugging etc.
INNOEXTRA+=" --password="
fi