summaryrefslogtreecommitdiff
path: root/ec2-set-apt-sources.py
diff options
context:
space:
mode:
authorChuck Short <zulcss@ubuntu.com>2009-05-14 12:11:49 +0200
committerChuck Short <zulcss@ubuntu.com>2009-05-14 12:11:49 +0200
commitebfb2ed46dc72aa78e1477607ccf77b1f552fcf0 (patch)
tree43ac6c2aa8d16a1f6d8d9fbf596605a4a9c1c32a /ec2-set-apt-sources.py
parentdd112c3afe50c75ae9b00f142b550c6e0d95f47b (diff)
downloadvyos-cloud-init-ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0.tar.gz
vyos-cloud-init-ebfb2ed46dc72aa78e1477607ccf77b1f552fcf0.zip
* debian/init: Move init script to run before ssh and regenerate the ssh
host kes in the init script rather than /etc/rc.local (LP: #370628) * ec2-set-apt-sources.py: - Move sources.list to /var/ec2 so it doesnt get removed after user reboots. * ec2-set-defaults.py: - Move locale to /var/ec2/ so it doesnt get remove after user reboots. * ec2-set-hostname.py - Create an /etc/hostname as well.
Diffstat (limited to 'ec2-set-apt-sources.py')
-rwxr-xr-xec2-set-apt-sources.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/ec2-set-apt-sources.py b/ec2-set-apt-sources.py
index 8efb5896..6327a78b 100755
--- a/ec2-set-apt-sources.py
+++ b/ec2-set-apt-sources.py
@@ -50,20 +50,20 @@ def detectZone():
def updateList(filename):
mirror = detectZone()
- if not os.path.exists("/var/run/ec2/sources.lists"):
+ if not os.path.exists("/var/ec2/sources.lists"):
t = os.popen("lsb_release -c").read()
codename = t.split()
distro = codename[1]
mp = {'mirror' : mirror, 'codename' : distro}
t = Template(file="/etc/ec2-init/templates/sources.list.tmpl", searchList=[mp])
- f = open("/var/run/ec2/sources.list", "w")
+ f = open("/var/ec2/sources.list", "w")
f.write('%s' %(t))
f.close()
if not os.path.exists("/etc/apt/sources.list-ec2-init"):
os.system("mv /etc/apt/sources.list /etc/apt/sources.list-ec2-init")
- os.symlink("/var/run/ec2/sources.list", "/etc/apt/sources.list")
+ os.symlink("/var/ec2/sources.list", "/etc/apt/sources.list")
cache = apt.Cache(apt.progress.OpProgress())
prog = apt.progress.FetchProgress()
cache.update(prog)