From 7f2fab0106d8bb43fb8f590c1d243fab4f2ab1cf Mon Sep 17 00:00:00 2001 From: Vincent Milum Jr Date: Wed, 13 Sep 2017 10:48:10 -0700 Subject: Fixes Galera on FreeBSD Corrects the following error with rsync sst on FreeBSD: WSREP_SST: [ERROR] rsync daemon port '4444' has been taken The FreeBSD version of grep doesn't play nicely with the -w parameter mixed with [[:space:]] and ends up matching nothing. This causes the script to loop and attempt to spawn more than one instance of rsync, which fails with the initial instance already having the port open. Because of this, the entire script fails and no sst occurs resulting in the error message listed above appearing in the log file. --- scripts/wsrep_sst_rsync.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/wsrep_sst_rsync.sh') diff --git a/scripts/wsrep_sst_rsync.sh b/scripts/wsrep_sst_rsync.sh index 7acdf87b660..24720ff3587 100644 --- a/scripts/wsrep_sst_rsync.sh +++ b/scripts/wsrep_sst_rsync.sh @@ -68,7 +68,7 @@ check_pid_and_port() local port_info="$(sockstat -46lp ${rsync_port} 2>/dev/null | \ grep ":${rsync_port}")" local is_rsync="$(echo $port_info | \ - grep -w '[[:space:]]\+rsync[[:space:]]\+'"$rsync_pid" 2>/dev/null)" + grep '[[:space:]]\+rsync[[:space:]]\+'"$rsync_pid" 2>/dev/null)" ;; *) if ! which lsof > /dev/null; then -- cgit v1.2.1