summaryrefslogtreecommitdiffstats
path: root/bin/schroot-create.sh
diff options
context:
space:
mode:
authorMattia Rizzolo <mattia@mapreri.org>2015-04-04 21:14:11 +0200
committerHolger Levsen <holger@layer-acht.org>2015-04-05 14:35:27 +0200
commit77837786ad7d9fbfb606703c3313f4f66456498b (patch)
tree3f58d7fb3a2844a142908897a0cb7899eb8c4ee4 /bin/schroot-create.sh
parent826506614f3acb760fc2185e8ce79d12cd3d095a (diff)
downloadjenkins.debian.net-77837786ad7d9fbfb606703c3313f4f66456498b.tar.xz
schroot-create/reproducible_setup_pbuilder: configure the proxy inside the chroot IFF http_proxy is defined
Diffstat (limited to 'bin/schroot-create.sh')
-rwxr-xr-xbin/schroot-create.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/bin/schroot-create.sh b/bin/schroot-create.sh
index cec1563c..2293dff5 100755
--- a/bin/schroot-create.sh
+++ b/bin/schroot-create.sh
@@ -98,7 +98,9 @@ bootstrap() {
echo -e '#!/bin/sh\nexit 101' | sudo tee $CHROOT_TARGET/usr/sbin/policy-rc.d >/dev/null
sudo chmod +x $CHROOT_TARGET/usr/sbin/policy-rc.d
- echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null
+ if [ ! -z "$http_proxy" ] ; then
+ echo "Acquire::http::Proxy \"$http_proxy\";" | sudo tee $CHROOT_TARGET/etc/apt/apt.conf.d/80proxy >/dev/null
+ fi
echo "deb-src $MIRROR $SUITE main" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list > /dev/null
for i in $(seq 0 5) ; do
[ -z "${EXTRA_SOURCES[$i]}" ] || echo "${EXTRA_SOURCES[$i]}" | sudo tee -a $CHROOT_TARGET/etc/apt/sources.list >/dev/null