diff --git a/smoketests/proxy.sh b/smoketests/proxy.sh index 9b3f3108afb1..b9057fe9dec6 100755 --- a/smoketests/proxy.sh +++ b/smoketests/proxy.sh @@ -11,12 +11,19 @@ mkfifo backpipe1 mkfifo backpipe2 +if nc -h 2>&1 | grep -i openbsd +then + NC_LISTEN="nc -l" +else + NC_LISTEN="nc -l -p" +fi + # NOTE(vish): proxy metadata on port 80 while true; do - nc -l -p 80 0backpipe1 + $NC_LISTEN 80 0backpipe1 done & # NOTE(vish): proxy google on port 8080 while true; do - nc -l -p 8080 0backpipe2 + $NC_LISTEN 8080 0backpipe2 done &