Replace security.ubuntu.com when setting mirror
The current method to rewrite the mirror URL in the ubuntu element will only rewrite archive.ubuntu.com, which leaves the security URL alone. This is probably not intended for people who are creating images behind firewalls. Change-Id: I54a867e0e9d5a7c94324a5c00ff1a83b4e6e4524
This commit is contained in:
parent
6360b46229
commit
a84611d766
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user