summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_rsync.sh
diff options
context:
space:
mode:
authorJulius Goryavsky <julius.goryavsky@mariadb.com>2021-09-20 12:10:53 +0200
committerJulius Goryavsky <julius.goryavsky@mariadb.com>2021-09-20 12:10:53 +0200
commitf4d6d01782ad4c885f1a4041514ba58f7b7d4ad2 (patch)
tree67818e69bdc3c78017d166e19dec006ca0509fba /scripts/wsrep_sst_rsync.sh
parent3209bc667fd3aeb7b3c3709ca927c2e77a5bf273 (diff)
downloadmariadb-git-f4d6d01782ad4c885f1a4041514ba58f7b7d4ad2.tar.gz
MDEV-26441: Linux-dependent construct in SST scriptsbb-10.2-MDEV-26441-galera
SST scripts currently use Linux-specific construction to create a temporary directory if the path prefix for that directory is specified by the user. This does not work with FreeBSD. This commit adds support for FreeBSD. No separate test required.
Diffstat (limited to 'scripts/wsrep_sst_rsync.sh')
-rw-r--r--scripts/wsrep_sst_rsync.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh
index d90e87b68f2..e16ed75cb16 100644
--- a/scripts/wsrep_sst_rsync.sh
+++ b/scripts/wsrep_sst_rsync.sh
@@ -725,8 +725,10 @@ EOF
tmpdir=$(parse_cnf '--mysqld|sst' 'tmpdir')
if [ -z "$tmpdir" ]; then
tmpfile="$(mktemp)"
- else
+ elif [ "$OS" = 'Linux' ]; then
tmpfile=$(mktemp "--tmpdir=$tmpdir")
+ else
+ tmpfile=$(TMPDIR="$tmpdir"; mktemp '-d')
fi
wsrep_log_info "Extracting binlog files:"