MDEV-27737 Wsrep SST scripts not working on FreeBSD

- 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>
This commit is contained in:
Teemu Ollakka 2022-02-03 12:06:25 +00:00 committed by Jan Lindström
parent 5c89386fdb
commit 21413aee0a
3 changed files with 12 additions and 4 deletions

View file

@ -1,4 +1,7 @@
#!/bin/bash -ue
#!/usr/bin/env bash
set -ue
# Copyright (C) 2017-2021 MariaDB
# Copyright (C) 2013 Percona Inc
#

View file

@ -1,4 +1,7 @@
#!/bin/bash -ue
#!/usr/bin/env bash
set -ue
# Copyright (C) 2009-2015 Codership Oy
# Copyright (C) 2017-2021 MariaDB
#

View file

@ -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:"