From be69a54e1e9dde183669697d8605e6784c79e50a 2015-12-11 12:30:09 From: Jan Wagner Date: 2015-12-11 12:30:09 Subject: [PATCH] fix: APT_PROXY enabled inside chroot --- diff --git a/rpi2-gen-image.sh b/rpi2-gen-image.sh index 95a125d..67315e3 100755 --- a/rpi2-gen-image.sh +++ b/rpi2-gen-image.sh @@ -176,6 +176,11 @@ mount -t proc none $R/proc mount -t sysfs none $R/sys mount --bind /dev/pts $R/dev/pts +# Use proxy inside chroot +if [ -z "$APT_PROXY" ] ; then + echo "Acquire::http::Proxy \"$APT_PROXY\"" >> $R/etc/apt/apt.conf.d/10proxy +fi + # Pin package flash-kernel to repositories.collabora.co.uk cat <$R/etc/apt/preferences.d/flash-kernel Package: flash-kernel @@ -708,6 +713,7 @@ rm -rf $R/tmp/* rm -f $R/var/lib/urandom/random-seed [ -L $R/var/lib/dbus/machine-id ] || rm -f $R/var/lib/dbus/machine-id rm -f $R/etc/machine-id +rm -fr $R/etc/apt/apt.conf.d/10proxy # Calculate size of the chroot directory CHROOT_SIZE=$(expr `du -s $R | awk '{ print $1 }'` / 1024)