diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 23ee3df5d40..7acdf87b660 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -357,18 +357,18 @@ EOF readonly RSYNC_PORT=${WSREP_SST_OPT_PORT:-4444} # If the IP is local listen only in it - if is_local_ip $RSYNC_ADDR + if is_local_ip "$RSYNC_ADDR" then - rsync --daemon --no-detach --address $RSYNC_ADDR --port $RSYNC_PORT --config "$RSYNC_CONF" & + rsync --daemon --no-detach --address "$RSYNC_ADDR" --port "$RSYNC_PORT" --config "$RSYNC_CONF" & else # Not local, possibly a NAT, listen in all interface - rsync --daemon --no-detach --port $RSYNC_PORT --config "$RSYNC_CONF" & + rsync --daemon --no-detach --port "$RSYNC_PORT" --config "$RSYNC_CONF" & # Overwrite address with all RSYNC_ADDR="*" fi RSYNC_REAL_PID=$! - until check_pid_and_port $RSYNC_PID $RSYNC_REAL_PID $RSYNC_ADDR $RSYNC_PORT + until check_pid_and_port "$RSYNC_PID" "$RSYNC_REAL_PID" "$RSYNC_ADDR" "$RSYNC_PORT" do sleep 0.2 done