diskimage-builder/elements/local-config/install.d/61-http-proxy
Ghe Rivero 147489f239 Add missing whitespace to local-config.
Fix whitespace error in local-config/install.d/61-http-proxy that prevents
no-proxy being written.

Change-Id: Ie2511bb5b2504c42ff59ec277cd91bf92b56da59
2012-12-20 16:05:50 +13:00

27 lines
705 B
Bash
Executable File

#!/bin/bash
# Save the HTTP if one is available.
# XXX: Obviously not suitable for downloadable images.
set -e
set -o xtrace
if [ -n "$http_proxy" ]; then
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
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