From 6ae60b2e8f379e6e9e74c8ef312f623b21f008d6 Mon Sep 17 00:00:00 2001 From: Xiang Chen Date: Fri, 22 Jul 2016 14:17:46 +0800 Subject: [PATCH] add no_proxy when debootstrap trying to use proxy Most of the time,no useing no_proxy is ok,but sometime this will cause problem. Add no_proxy here will increase the robustness of the program . Change-Id: I976e689760d2e6de9e2081fcdee4f71299e8470e --- elements/debootstrap/root.d/08-debootstrap | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/elements/debootstrap/root.d/08-debootstrap b/elements/debootstrap/root.d/08-debootstrap index bf94feb15..8af7a91e5 100755 --- a/elements/debootstrap/root.d/08-debootstrap +++ b/elements/debootstrap/root.d/08-debootstrap @@ -46,6 +46,7 @@ DIB_DEBIAN_COMPONENTS=${DIB_DEBIAN_COMPONENTS:-main} DIB_DEBOOTSTRAP_EXTRA_ARGS=${DIB_DEBOOTSTRAP_EXTRA_ARGS:-} DEBOOTSTRAP_TARBALL=$DIB_IMAGE_CACHE/debootstrap-${DISTRO_NAME}-${DIB_RELEASE}-${ARCH}-${KERNEL}.tar.gz http_proxy=${http_proxy:-} +no_proxy=${no_proxy:-} if [ -n "$DIB_OFFLINE" -o -n "${DIB_DEBIAN_USE_DEBOOTSTRAP_CACHE:-}" ] && [ -f $DEBOOTSTRAP_TARBALL ] ; then echo $DEBOOTSTRAP_TARBALL found in cache. Using. @@ -60,7 +61,7 @@ else # Have to --include=python because of dib-run-parts # Have to --include=sudo for pre-install.d use of sudoers files # Have to --include=busybox because initramfs needs it - sudo sh -c "http_proxy=$http_proxy debootstrap --verbose \ + sudo sh -c "http_proxy=$http_proxy no_proxy=$no_proxy debootstrap --verbose \ --variant=minbase \ --include=python,sudo,busybox,$KERNEL_PACKAGE \ --components=${DIB_DEBIAN_COMPONENTS} \