diff --git a/scripts/ocsp-stapling.test b/scripts/ocsp-stapling.test index 3d8ecdbc9..2d544da1b 100755 --- a/scripts/ocsp-stapling.test +++ b/scripts/ocsp-stapling.test @@ -448,12 +448,11 @@ generate_port() { # Generate a random port number #-------------------------------------------------------------------------# - if [[ "$OSTYPE" == "linux"* ]]; then + if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys" + || "$OSTYPE" == "cygwin"* ]]; then port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512)) elif [[ "$OSTYPE" == "darwin"* ]]; then port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512)) - elif [[ "$OSTYPE" == "msys" ]]; then - port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512)) else echo "Unknown OS TYPE" exit 1 diff --git a/scripts/ocsp-stapling2.test b/scripts/ocsp-stapling2.test index dea1af61b..4ce8729d3 100755 --- a/scripts/ocsp-stapling2.test +++ b/scripts/ocsp-stapling2.test @@ -467,7 +467,8 @@ generate_port() { # Generate a random port number #-------------------------------------------------------------------------# - if [[ "$OSTYPE" == "linux"* ]]; then + if [[ "$OSTYPE" == "linux"* || "$OSTYPE" == "msys" + || "$OSTYPE" == "cygwin" ]]; then port=$(($(od -An -N2 /dev/urandom) % (65535-49512) + 49512)) elif [[ "$OSTYPE" == "darwin"* ]]; then port=$(($(od -An -N2 /dev/random) % (65535-49512) + 49512))