ports/databases/mariadb/patches/patch-scripts_wsrep_sst_rsync_sh

23 lines
810 B
Text
Raw Normal View History

2023-08-16 22:26:55 +00:00
Index: scripts/wsrep_sst_rsync.sh
--- scripts/wsrep_sst_rsync.sh.orig
+++ scripts/wsrep_sst_rsync.sh
@@ -127,9 +127,15 @@ check_pid_and_port()
2023-08-16 22:26:55 +00:00
fi
final='$'
else
- port_info=$($socket_utility $lsof_opts -i ":$port" 2>/dev/null | \
- grep -w -F '(LISTEN)' || :)
- final='[[:space:]]'
+ if [ $fstat_available -ne 0 ]; then
+ port_info=$($socket_utility $fstat_opts 2>/dev/null | \
+ grep -E "[[:space:]](\\*|\\[?::\\]?):$port\$")
+ final=''
+ else
+ port_info=$($socket_utility $lsof_opts -i ":$port" 2>/dev/null | \
+ grep -w -F '(LISTEN)' || :)
+ final='[[:space:]]'
+ fi
fi
local busy=0