From dd074806ad51761392a9cca3f1f04fbbebd3de22 Mon Sep 17 00:00:00 2001 From: Victor Morales Date: Wed, 26 Jul 2017 16:06:35 -0500 Subject: Sync latest changes for vagrant-onap Given some internal procedures was not possible to submit all the changes. In the meantime, those changes were placed into an non-official project. This change syncronizes the latest changes into the official repository. Issue-id: INT-17 Change-Id: Ia4125f4b70273401e4ed3cc1908d2e2ad7d1c2e9 Signed-off-by: Victor Morales --- bootstrap/vagrant-onap/lib/commons | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'bootstrap/vagrant-onap/lib/commons') diff --git a/bootstrap/vagrant-onap/lib/commons b/bootstrap/vagrant-onap/lib/commons index 783dc0b36..019eeb5c2 100755 --- a/bootstrap/vagrant-onap/lib/commons +++ b/bootstrap/vagrant-onap/lib/commons @@ -7,7 +7,20 @@ function update_repos { if [ -f /var/onap/files/sources.list ]; then cp /var/onap/files/sources.list /etc/apt/sources.list fi - apt-get update -y + if [ -f /var/onap/files/proxyrc ]; then + source /var/onap/files/proxyrc + cp /var/onap/files/proxyrc /etc/profile.d/proxy.sh + + if [ -f /etc/apt/apt.conf ]; then + echo "Acquire::http::Proxy \"${http_proxy}\";" >> /etc/apt/apt.conf + echo "Acquire::https::Proxy \"${https_proxy}\";" >> /etc/apt/apt.conf + fi + if [ -d /etc/apt/apt.conf.d ] & [ ! -f /etc/apt/apt.conf.d/70proxy.conf ]; then + echo "Acquire::http::Proxy \"${http_proxy}\";" >> /etc/apt/apt.conf.d/70proxy.conf + echo "Acquire::https::Proxy \"${https_proxy}\";" >> /etc/apt/apt.conf.d/70proxy.conf + fi + fi + apt-get update -qq -y } # is_package_installed() - Function to tell if a package is installed @@ -23,6 +36,6 @@ function install_package { local package=$1 if ! is_package_installed $package; then update_repos - apt-get install -y $package + apt-get install -y -qq $package fi } -- cgit 1.2.3-korg