From e9645253d2e6814fec956fd6c6036ee709ec9a3f Mon Sep 17 00:00:00 2001
From: Dan Radez <dradez@redhat.com>
Date: Tue, 29 Nov 2016 15:06:29 -0500
Subject: adding option to pass dnslookup site

Change-Id: I73d8e92b97b25b39010380d09f7fad3c65795869
Signed-off-by: Dan Radez <dradez@redhat.com>
---
 ci/deploy.sh            | 7 +++++++
 lib/common-functions.sh | 2 +-
 2 files changed, 8 insertions(+), 1 deletion(-)

diff --git a/ci/deploy.sh b/ci/deploy.sh
index 482e134b..f09529a7 100755
--- a/ci/deploy.sh
+++ b/ci/deploy.sh
@@ -24,6 +24,7 @@ green=$(tput setaf 2 || echo "")
 
 interactive="FALSE"
 ping_site="8.8.8.8"
+dnslookup_site="www.google.com"
 post_config="TRUE"
 debug="FALSE"
 
@@ -82,6 +83,7 @@ display_usage() {
   echo -e "   --inventory | -i : Full path to inventory yaml file. Required only for baremetal"
   echo -e "   --net-settings | -n : Full path to network settings file. Optional."
   echo -e "   --ping-site | -p : site to use to verify IP connectivity. Optional. Defaults to 8.8.8.8"
+  echo -e "   --dnslookup-site : site to use to verify DNS resolution. Optional. Defaults to www.google.com"
   echo -e "   --virtual | -v : Virtualize overcloud nodes instead of using baremetal."
   echo -e "   --no-post-config : disable Post Install configuration."
   echo -e "   --debug : enable debug output."
@@ -123,6 +125,11 @@ parse_cmdline() {
                 echo "Using $2 as the ping site"
                 shift 2
             ;;
+        --dnslookup-site)
+                dnslookup_site=$2
+                echo "Using $2 as the dnslookup site"
+                shift 2
+            ;;
         -v|--virtual)
                 virtual="TRUE"
                 echo "Executing a Virtual Deployment"
diff --git a/lib/common-functions.sh b/lib/common-functions.sh
index 2d113450..709dbf97 100644
--- a/lib/common-functions.sh
+++ b/lib/common-functions.sh
@@ -281,7 +281,7 @@ contains_prefix() {
 #params: none
 function verify_internet {
   if ping -c 2 $ping_site > /dev/null; then
-    if ping -c 2 www.google.com > /dev/null; then
+    if ping -c 2 $dnslookup_site > /dev/null; then
       echo "${blue}Internet connectivity detected${reset}"
       return 0
     else
-- 
cgit