]> git.ipfire.org Git - thirdparty/chrony.git/commitdiff
test: fix port selection to disable grep output
authorMiroslav Lichvar <mlichvar@redhat.com>
Wed, 13 Jan 2021 15:59:17 +0000 (16:59 +0100)
committerMiroslav Lichvar <mlichvar@redhat.com>
Thu, 14 Jan 2021 17:17:48 +0000 (18:17 +0100)
test/system/test.common

index 1e488195408052386e0b5253bd94fcce420b4cf1..4e5fa0246b90dabd2120102d5072afc94d7bf3ea 100644 (file)
@@ -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