summaryrefslogtreecommitdiff
path: root/scripts/wsrep_sst_mariabackup.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_mariabackup.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_mariabackup.sh')
-rw-r--r--scripts/wsrep_sst_mariabackup.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh
index 562b9b929f2..54632e5f79b 100644
--- a/scripts/wsrep_sst_mariabackup.sh
+++ b/scripts/wsrep_sst_mariabackup.sh
@@ -949,8 +949,10 @@ then
tmpdir=$(parse_cnf "$encgroups" 'tmpdir')
if [ -z "$tmpdir" ]; then
xtmpdir="$(mktemp -d)"
- else
+ elif [ "$OS" = 'Linux' ]; then
xtmpdir=$(mktemp '-d' "--tmpdir=$tmpdir")
+ else
+ xtmpdir=$(TMPDIR="$tmpdir"; mktemp '-d')
fi
wsrep_log_info "Using '$xtmpdir' as mariabackup temporary directory"