diff --git a/compute/src/test/resources/initscript_with_java.sh b/compute/src/test/resources/initscript_with_java.sh index a82c9052db..4d60764c85 100644 --- a/compute/src/test/resources/initscript_with_java.sh +++ b/compute/src/test/resources/initscript_with_java.sh @@ -118,7 +118,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/compute/src/test/resources/initscript_with_jboss.sh b/compute/src/test/resources/initscript_with_jboss.sh index a971c4f590..5e4fd84fe7 100644 --- a/compute/src/test/resources/initscript_with_jboss.sh +++ b/compute/src/test/resources/initscript_with_jboss.sh @@ -118,7 +118,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/compute/src/test/resources/runscript.sh b/compute/src/test/resources/runscript.sh index 984caa7f2c..52f622d1ab 100644 --- a/compute/src/test/resources/runscript.sh +++ b/compute/src/test/resources/runscript.sh @@ -118,7 +118,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh b/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh index 34b794cb6c..2d6320ed4c 100644 --- a/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh +++ b/labs/virtualbox/src/test/resources/test_guest_additions_installer_init.sh @@ -117,7 +117,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh b/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh index 89df345e22..b299200af6 100644 --- a/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh +++ b/scriptbuilder/src/main/resources/functions/setupPublicCurl.sh @@ -33,7 +33,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh index d942959865..7539de4e91 100644 --- a/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_git_scriptbuilder.sh @@ -118,7 +118,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() { diff --git a/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh b/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh index 8183a5256b..b9dae5e263 100644 --- a/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh +++ b/scriptbuilder/src/test/resources/test_install_jdk_scriptbuilder.sh @@ -118,7 +118,7 @@ function ensure_hostname_in_hosts() { # download locations for many services are at public dns function ensure_can_resolve_public_dns() { - nslookup yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf + nslookup yahoo.com | grep yahoo.com > /dev/null || echo nameserver 208.67.222.222 >> /etc/resolv.conf } function setupPublicCurl() {