From dba9418f03aa1c2036d781a071923b4936cffc90 Mon Sep 17 00:00:00 2001 From: Devananda van der Veen Date: Fri, 7 Dec 2012 14:52:35 -0800 Subject: [PATCH] Copy both http and https proxy to local-config. Previously, only http_proxy was copied into the local-config image. We now preserve both http_proxy and https_proxy settings. Change-Id: I4de2712f2772fb7d07b228cecdc0c8ec6f3df567 Co-authored-by: Chris Krelle --- elements/local-config/install.d/61-http-proxy | 20 +++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/elements/local-config/install.d/61-http-proxy b/elements/local-config/install.d/61-http-proxy index 99ec1e0a2..20391d2b8 100755 --- a/elements/local-config/install.d/61-http-proxy +++ b/elements/local-config/install.d/61-http-proxy @@ -6,9 +6,21 @@ set -e set -o xtrace if [ -n "$http_proxy" ]; then - if [ -d ~stack ]; then - echo export no_proxy=192.0.2.1 >> ~stack/.profile + if [ -d ~stack ]; then echo export http_proxy=$http_proxy >> ~stack/.profile - fi - echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/61-use-http-proxy + fi + echo "Acquire::http::Proxy \"$http_proxy\";" > /etc/apt/apt.conf.d/61-use-http-proxy +fi + +if [ -n "$https_proxy" ]; then + if [ -d ~stack ]; then + echo export https_proxy=$https_proxy >> ~stack/.profile + fi + echo "Acquire::https::Proxy \"$https_proxy\";" > /etc/apt/apt.conf.d/61-use-https-proxy +fi + +if [ -n "$http_proxy" -o -n "$https_proxy"]; then + if [ -d ~stack ]; then + echo export no_proxy=192.0.2.1 >> ~stack/.profile + fi fi