aboutsummaryrefslogtreecommitdiffstats
path: root/bootstrap/vagrant-onap/lib/commons
diff options
context:
space:
mode:
authorVictor Morales <victor.morales@intel.com>2017-07-26 16:06:35 -0500
committerVictor Morales <victor.morales@intel.com>2017-07-26 16:06:35 -0500
commitdd074806ad51761392a9cca3f1f04fbbebd3de22 (patch)
tree9088768b55bf307875369e7368f56c7e66149424 /bootstrap/vagrant-onap/lib/commons
parent8805879b4dc92014381ba55b75955b295944ded6 (diff)
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 <victor.morales@intel.com>
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
}