summaryrefslogtreecommitdiffstats
path: root/kubernetes/portal/resources/scripts/update_hosts.sh
diff options
context:
space:
mode:
authorJerome Doucerain <jerome.doucerain@bell.ca>2018-03-29 13:19:15 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-29 13:19:15 +0000
commit463a25a6910769882378766448ed2f3b9440b5f4 (patch)
tree40dd6cf4bb47eaab50d210ddfe69f627bf0cdd05 /kubernetes/portal/resources/scripts/update_hosts.sh
parentb6f89dc0d2b461a7e3f083ebe8936de2bb8e0f6e (diff)
parent1d12388430a6112d86200fdabba1f156d6bf2ef6 (diff)
Merge "Standardizing ONAP Portal"
Diffstat (limited to 'kubernetes/portal/resources/scripts/update_hosts.sh')
-rw-r--r--kubernetes/portal/resources/scripts/update_hosts.sh17
1 files changed, 0 insertions, 17 deletions
diff --git a/kubernetes/portal/resources/scripts/update_hosts.sh b/kubernetes/portal/resources/scripts/update_hosts.sh
deleted file mode 100644
index cd38fafb40..0000000000
--- a/kubernetes/portal/resources/scripts/update_hosts.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/sh
-
-_SRC_HOST=$1
-_DST_HOST=$2
-_IP=`getent hosts ${_SRC_HOST}|cut -d' ' -f1`
-if [ -z ${_IP} ]; then
- echo "Cannot retreive IP for host mapping ${_SRC_HOST} -> ${_DST_HOST}"
- exit 1
-fi
-_REGEX=".*[[:blank:]]${_DST_HOST}$"
-if grep -c -e "${_REGEX}" /etc/hosts > /dev/null 2>&1 ; then
- cp /etc/hosts /tmp/hosts
- sed -i "s/${_REGEX}/${_IP} ${_DST_HOST}/g" /tmp/hosts
- cp /tmp/hosts /etc/hosts
-else
- echo "${_IP} ${_DST_HOST}" >> /etc/hosts
-fi