From 7052ae1732dc29e5b7f6e314e6fa41c4b362b1a2 Mon Sep 17 00:00:00 2001 From: Mario Limonciello Date: Thu, 5 May 2011 12:00:49 -0500 Subject: [PATCH] Pass proxy variables into a chroot. BUG=chromium-os:10048 TEST=Enter chroot with http_proxy set and check export. Change-Id: I590bd38d22ca1be8164d2a2b408230163d9e5777 Reviewed-on: http://gerrit.chromium.org/gerrit/344 Reviewed-by: David James Reviewed-by: Doug Anderson Tested-by: Doug Anderson --- enter_chroot.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/enter_chroot.sh b/enter_chroot.sh index 3b41209e71..c642b7b04c 100755 --- a/enter_chroot.sh +++ b/enter_chroot.sh @@ -403,6 +403,14 @@ CHROMEOS_VERSION_TRACK=${CHROMEOS_VERSION_TRACK} \ CHROMEOS_VERSION_AUSERVER=${CHROMEOS_VERSION_AUSERVER} \ CHROMEOS_VERSION_DEVSERVER=${CHROMEOS_VERSION_DEVSERVER}" +# Pass proxy variables into the environment. +for type in http_proxy ftp_proxy all_proxy GIT_PROXY_COMMAND GIT_SSH; do + eval value=\$${type} + if [ -n "${value}" ]; then + CHROOT_PASSTHRU="${CHROOT_PASSTHRU} ${type}=${value}" + fi +done + if [ -d "$HOME/.subversion" ]; then TARGET="/home/${USER}/.subversion" mkdir -p "${FLAGS_chroot}${TARGET}"