Commit c2c2a678 authored by Edita Kizinevic's avatar Edita Kizinevic Committed by Andrea Sciaba
Browse files

Correctly parse output of host command

parent 9cecebde
......@@ -2,7 +2,7 @@
shopt -s expand_aliases
SCRIPT_REVISION="2019-03-05, Dave Dykstra and Edita Kizinevic"
SCRIPT_REVISION="2019-04-15, Dave Dykstra and Edita Kizinevic"
# Source the CMS environment
if [ -n "$OSG_GRID" ] ; then
......@@ -99,8 +99,8 @@ check_proxies() {
*"(proxyurl="*)
hostname=${proxy#*//}
hostname=${hostname%:*}
IP_addresses=`host $hostname | awk '{ print $NF }'`
if [ "$IP_addresses" == "3(NXDOMAIN)" ]; then
IP_addresses=`host $hostname | grep "has.*address" | awk '{ print $NF }'`
if [ -z "$IP_addresses" ]; then
echo "Host $hostname not found"
echo
ever_failed=true
......
Markdown is supported
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