aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/commons
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/vagrant-onap/lib/commons')
-rwxr-xr-xbootstrap/vagrant-onap/lib/commons17
1 files changed, 15 insertions, 2 deletions
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
}