diff options
author | Teemu Ollakka <teemu.ollakka@galeracluster.com> | 2022-02-03 12:06:25 +0000 |
---|---|---|
committer | Jan Lindström <jan.lindstrom@mariadb.com> | 2022-02-08 08:02:01 +0200 |
commit | 21413aee0a32c80708a02a96074c108f3db419f1 (patch) | |
tree | e0533e4dff44579cebd9f6334efa2d7727754c3a | |
parent | 5c89386fdbd5eb9062e10247380ad65cb85c9f29 (diff) | |
download | mariadb-git-bb-10.2-galera.tar.gz |
MDEV-27737 Wsrep SST scripts not working on FreeBSDbb-10.2-galera
- Changed SST scripts to use /usr/bin/env bash instead of
/bin/bash for better portability.
- Fixed use of mktemp on non-Linux platforms to produce
temporary file instead of directory.
Reviewed-by: Jan Lindström <jan.lindstrom@mariadb.com>
-rw-r--r-- | scripts/wsrep_sst_mariabackup.sh | 5 | ||||
-rw-r--r-- | scripts/wsrep_sst_mysqldump.sh | 5 | ||||
-rw-r--r-- | scripts/wsrep_sst_rsync.sh | 6 |
3 files changed, 12 insertions, 4 deletions
diff --git a/scripts/wsrep_sst_mariabackup.sh b/scripts/wsrep_sst_mariabackup.sh index aa9442b0601..471b0e5f5b0 100644 --- a/scripts/wsrep_sst_mariabackup.sh +++ b/scripts/wsrep_sst_mariabackup.sh @@ -1,4 +1,7 @@ -#!/bin/bash -ue +#!/usr/bin/env bash + +set -ue + # Copyright (C) 2017-2021 MariaDB # Copyright (C) 2013 Percona Inc # diff --git a/scripts/wsrep_sst_mysqldump.sh b/scripts/wsrep_sst_mysqldump.sh index bed2cac0a9a..1c8fc181328 100644 --- a/scripts/wsrep_sst_mysqldump.sh +++ b/scripts/wsrep_sst_mysqldump.sh @@ -1,4 +1,7 @@ -#!/bin/bash -ue +#!/usr/bin/env bash + +set -ue + # Copyright (C) 2009-2015 Codership Oy # Copyright (C) 2017-2021 MariaDB # diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 28dfed18218..cc73db5da87 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -1,4 +1,6 @@ -#!/bin/bash -ue +#!/usr/bin/env bash + +set -ue # Copyright (C) 2017-2021 MariaDB # Copyright (C) 2010-2014 Codership Oy @@ -740,7 +742,7 @@ EOF elif [ "$OS" = 'Linux' ]; then tmpfile=$(mktemp "--tmpdir=$tmpdir") else - tmpfile=$(TMPDIR="$tmpdir"; mktemp '-d') + tmpfile=$(TMPDIR="$tmpdir"; mktemp) fi wsrep_log_info "Extracting binlog files:" |