diff --git a/elements/ubuntu/README.md b/elements/ubuntu/README.md index 009afe93..9fc02df8 100644 --- a/elements/ubuntu/README.md +++ b/elements/ubuntu/README.md @@ -6,5 +6,5 @@ Overrides: use the environment variable DIB\_CLOUD\_IMAGES * To download a non-default release of Ubuntu cloud images, use the environment variable DIB\_RELEASE - * To use a different mirror rather than archive.ubuntu.com, use the - environment variable DIB\_DISTRIBUTION\_MIRROR + * To use different mirrors rather than the default of archive.ubuntu.com and + security.ubuntu.com, use the environment variable DIB\_DISTRIBUTION\_MIRROR diff --git a/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror b/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror index 9633e9cd..a1b36494 100755 --- a/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror +++ b/elements/ubuntu/pre-install.d/01-set-ubuntu-mirror @@ -6,5 +6,5 @@ DIB_DISTRIBUTION_MIRROR=${DIB_DISTRIBUTION_MIRROR:-} [ -n "$DIB_DISTRIBUTION_MIRROR" ] || exit 0 -sudo sed -ie "s&http://archive.ubuntu.com/ubuntu&$DIB_DISTRIBUTION_MIRROR&" \ +sudo sed -ie "s&http://\(archive\|security\).ubuntu.com/ubuntu&$DIB_DISTRIBUTION_MIRROR&" \ /etc/apt/sources.list