Commit 2ef01d00 authored by Brad Smith's avatar Brad Smith Committed by Daniel Black

wsrep scripts fixes for working on OpenBSD

parent ee1407f7
...@@ -1166,9 +1166,9 @@ is_local_ip() ...@@ -1166,9 +1166,9 @@ is_local_ip()
# the domain name check: # the domain name check:
if [ "${2:-0}" -eq 0 ]; then if [ "${2:-0}" -eq 0 ]; then
# We consider all the names of a given host to be local addresses: # We consider all the names of a given host to be local addresses:
[ "$1" = "$(hostname -s)" -o \ [ "$1" = "$(hostname -s 2>/dev/null)" -o \
"$1" = "$(hostname -f)" -o \ "$1" = "$(hostname -f 2>/dev/null)" -o \
"$1" = "$(hostname -d)" ] && return 0 "$1" = "$(hostname -d 2>/dev/null)" ] && return 0
fi fi
# If the address contains anything other than digits # If the address contains anything other than digits
# and separators, it is not a local address: # and separators, it is not a local address:
......
...@@ -475,9 +475,9 @@ EOF ...@@ -475,9 +475,9 @@ EOF
# Preparing binlog files for transfer: # Preparing binlog files for transfer:
wsrep_log_info "Preparing binlog files for transfer:" wsrep_log_info "Preparing binlog files for transfer:"
tar_type=0 tar_type=0
if tar --help | grep -qw -F -- '--transform'; then if tar --help 2>/dev/null | grep -qw -F -- '--transform'; then
tar_type=1 tar_type=1
elif tar --version | grep -qw -E '^bsdtar'; then elif tar --version 2>/dev/null | grep -qw -E '^bsdtar'; then
tar_type=2 tar_type=2
fi fi
if [ $tar_type -eq 2 ]; then if [ $tar_type -eq 2 ]; then
...@@ -980,7 +980,7 @@ EOF ...@@ -980,7 +980,7 @@ EOF
fi fi
# Extracting binlog files: # Extracting binlog files:
wsrep_log_info "Extracting binlog files:" wsrep_log_info "Extracting binlog files:"
if tar --version | grep -qw -E '^bsdtar'; then if tar --version 2>/dev/null | grep -qw -E '^bsdtar'; then
tar -tf "$BINLOG_TAR_FILE" > "$tmpfile" && \ tar -tf "$BINLOG_TAR_FILE" > "$tmpfile" && \
tar -xvf "$BINLOG_TAR_FILE" > /dev/null || RC=$? tar -xvf "$BINLOG_TAR_FILE" > /dev/null || RC=$?
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment