nslookup on CentOS 6.2 doesn't set error code when failing, so grep expected output instead

This commit is contained in:
Dies Koper 2012-08-27 14:27:44 +10:00
parent d29774330b
commit b7666da170
7 changed files with 7 additions and 7 deletions

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {

View File

@ -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() {