From fff07e864ed9b7c57c067457546e4e8c2985ba47 Mon Sep 17 00:00:00 2001 From: Mate Lakat Date: Wed, 15 Oct 2014 16:42:40 +0200 Subject: [PATCH] XenAPI: Always update apt sources If an appliance is used as a base OS, the user might want to use that in a different region. With this change we always update the used mirrors in the template. Change-Id: I7a119664efac1124e54064311c243c63c2a7944b --- tools/xen/prepare_guest_template.sh | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/tools/xen/prepare_guest_template.sh b/tools/xen/prepare_guest_template.sh index e6a7e025b0..2d3b89821f 100755 --- a/tools/xen/prepare_guest_template.sh +++ b/tools/xen/prepare_guest_template.sh @@ -93,3 +93,28 @@ EOF # Need to set barrier=0 to avoid a Xen bug # https://bugs.launchpad.net/ubuntu/+source/linux/+bug/824089 sed -i -e 's/errors=/barrier=0,errors=/' $STAGING_DIR/etc/fstab + +# Update ubuntu repositories +cat > $STAGING_DIR/etc/apt/sources.list << EOF +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} main restricted +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} main restricted +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates main restricted +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates main restricted +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} universe +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} universe +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates universe +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates universe +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} multiverse +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE} multiverse +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates multiverse +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-updates multiverse +deb http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-backports main restricted universe multiverse +deb-src http://${UBUNTU_INST_HTTP_HOSTNAME}${UBUNTU_INST_HTTP_DIRECTORY} ${UBUNTU_INST_RELEASE}-backports main restricted universe multiverse + +deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security main restricted +deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security main restricted +deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security universe +deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security universe +deb http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse +deb-src http://security.ubuntu.com/ubuntu ${UBUNTU_INST_RELEASE}-security multiverse +EOF