Commit b720b116 authored by Edita Kizinevic's avatar Edita Kizinevic
Browse files

Replace host with getent function

parent a5ef8579
......@@ -2,7 +2,7 @@
shopt -s expand_aliases
SCRIPT_REVISION="2020-02-21, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION="2020-02-24, Dave Dykstra and Edita Kizinevic"
# Script does not use backupproxyurl if it is SAM test, but script uses backupproxyurl if it is pilot
......@@ -148,7 +148,7 @@ check_proxies() {
IP_addresses=`getent ahostsv4 $hostname | awk '/STREAM/{print $1}'`
if [ -z "$IP_addresses" ]; then
elif host $hostname | grep -q "has IPv6 address"; then
elif getent ahostsv6 $hostname | awk '/STREAM/{print $1}' | grep -qv ^::ffff:; then
IP_addresses="$IP_addresses $hostname"
for IP_address in $IP_addresses; do
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment