7.0

Table Of Contents
c Paste the following script.
#!/bin/bash
#Setting proxies
export ftp_proxy=${ftp_proxy:-$global_ftp_proxy}
echo "Setting ftp_proxy to $ftp_proxy"
export http_proxy=${http_proxy:-$global_http_proxy}
echo "Setting http_proxy to $http_proxy"
export https_proxy=${https_proxy:-$global_https_proxy}
echo "Setting https_proxy to $https_proxy"
#
# Determine operating system and version
#
export OS=
export OS_VERSION=
if [ -f /etc/redhat-release ]; then
# For CentOS the result will be 'CentOS'
# For RHEL the result will be 'Red'
OS=$(cat /etc/redhat-release | awk {'print $1'})
if [ -n $OS ] && [ $OS = 'CentOS' ]; then
OS_VERSION=$(cat /etc/redhat-release | awk '{print $3}')
else
# RHEL
OS_VERSION=$(cat /etc/redhat-release | awk '{print $7}')
fi
elif [ -f /etc/SuSE-release ]; then
OS=SuSE
MAJOR_VERSION=$(cat /etc/SuSE-release | grep VERSION | awk '{print $3}')
PATCHLEVEL=$(cat /etc/SuSE-release | grep PATCHLEVEL | awk '{print $3}')
OS_VERSION="$MAJOR_VERSION.$PATCHLEVEL"
elif [ -f /usr/bin/lsb_release ]; then
# For Ubuntu the result is 'Ubuntu'
OS=$(lsb_release -a 2> /dev/null | grep Distributor | awk '{print $3}')
OS_VERSION=$(lsb_release -a 2> /dev/null | grep Release | awk '{print $2}')
fi
echo "Using operating system '$OS' and version '$OS_VERSION'"
if [ "x${global_http_proxy}" == "x" ] || [ "x${global_https_proxy}" == "x" ] ||
[ "x${global_ftp_proxy}" == "x" ]; then
echo ""
echo "###############################################################"
echo "# One or more PROXY(s) not set. Network downloads may fail #"
echo "###############################################################"
Configuring vRealize Automation
VMware, Inc. 322