mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-03 19:05:06 -05:00
test: fix port selection to disable grep output
This commit is contained in:
@@ -180,7 +180,7 @@ get_free_port() {
|
||||
|
||||
while true; do
|
||||
port=$((RANDOM % 10000 + 10000))
|
||||
netstat -aln | grep '^\(tcp\|udp\).*[:.]'"$port " && continue
|
||||
netstat -aln | grep -q '^\(tcp\|udp\).*[:.]'"$port " && continue
|
||||
break
|
||||
done
|
||||
|
||||
|
||||
Reference in New Issue
Block a user