From e35785d910995c05a3e43af51080c6c6c5631ec7 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Thu, 16 Oct 2014 15:40:03 +0200 Subject: [PATCH] XenAPI: Always update proxy settings If a user wants to re-use an xva just with different proxy settings, he can now do it, as this change will always update /etc/apt/apt.conf to reflect the settings in the user's localrc. Change-Id: I8a6e9c88304bc887ea8269d946e89a5ba258b126 --- tools/xen/prepare_guest_template.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh index 2d3b89821f..50f2b6a825 100755 --- a/tools/xen/prepare_guest_template.sh +++ b/tools/xen/prepare_guest_template.sh @@ -118,3 +118,10 @@ deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security univer deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse EOF + +rm -f $STAGING_DIR/etc/apt/apt.conf +if [ -n "$UBUNTU_INST_HTTP_PROXY" ]; then + cat > $STAGING_DIR/etc/apt/apt.conf << EOF +Acquire::http::Proxy "$UBUNTU_INST_HTTP_PROXY"; +EOF +fi