summaryrefslogtreecommitdiff
path: root/cloudinit/CloudConfig/cc_apt_update_upgrade.py
diff options
context:
space:
mode:
authorScott Moser <smoser@ubuntu.com>2011-12-16 16:05:45 -0500
committerScott Moser <smoser@ubuntu.com>2011-12-16 16:05:45 -0500
commitfd01c686cf918b8008568430095089f6a59fea70 (patch)
tree4ec194bbb5a9c179ab507318a1e17a4925217d67 /cloudinit/CloudConfig/cc_apt_update_upgrade.py
parent71e77a29142dcce86350c47b5848c8f0beebfe4d (diff)
downloadvyos-cloud-init-fd01c686cf918b8008568430095089f6a59fea70.tar.gz
vyos-cloud-init-fd01c686cf918b8008568430095089f6a59fea70.zip
use the distro when searching
instead of only searching ubuntu.localdomain, search <distro>-mirror.localdomain
Diffstat (limited to 'cloudinit/CloudConfig/cc_apt_update_upgrade.py')
-rw-r--r--cloudinit/CloudConfig/cc_apt_update_upgrade.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/cloudinit/CloudConfig/cc_apt_update_upgrade.py b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
index ea675d51..8d98b3a8 100644
--- a/cloudinit/CloudConfig/cc_apt_update_upgrade.py
+++ b/cloudinit/CloudConfig/cc_apt_update_upgrade.py
@@ -196,8 +196,9 @@ def find_apt_mirror(cloud, cfg):
doms.extend((".localdomain", "",))
mirror_list = []
+ mirrorfmt = "http://%s-mirror%s/%s" % (distro, "%s", distro )
for post in doms:
- mirror_list.append("http://ubuntu-mirror%s/ubuntu" % post)
+ mirror_list.append(mirrorfmt % post)
mirror = util.search_for_mirror(mirror_list)