mirror of
https://gitlab.com/chrony/chrony.git
synced 2025-12-04 01:45:07 -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
|
while true; do
|
||||||
port=$((RANDOM % 10000 + 10000))
|
port=$((RANDOM % 10000 + 10000))
|
||||||
netstat -aln | grep '^\(tcp\|udp\).*[:.]'"$port " && continue
|
netstat -aln | grep -q '^\(tcp\|udp\).*[:.]'"$port " && continue
|
||||||
break
|
break
|
||||||
done
|
done
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user