respect DEBOOTSTRAP_PROXY

if set in environment or config file DEBOOTSTRAP_PROXY takes precedence
over the larger scoped environment variable 'http_proxy'.
This commit is contained in:
Scott Moser 2011-10-25 19:25:09 -04:00
parent 09b49cda66
commit 56220bdd23

View File

@ -459,6 +459,8 @@ if [ -n "$DEBOOTSTRAP_EXCLUDE" ] ; then
fi
# if http_proxy is set in the environment (even empty) set 'proxy' to it
[ "$proxy" = "_unset_" -a "${DEBOOTSTRAP_PROXY-xx}" = "xx" ] &&
proxy=${DEBOOTSTRAP_PROXY}
[ "$proxy" = "_unset_" -a "${http_proxy-xx}" = "xx" ] && proxy=${http_proxy}
if [ "$proxy" = "_unset_" ]; then
_out=$(apt-config shell x Acquire::HTTP::Proxy) &&