summaryrefslogtreecommitdiff
path: root/ec2-set-defaults.py
diff options
context:
space:
mode:
authorSoren Hansen <soren@canonical.com>2009-08-11 08:20:55 +0200
committerSoren Hansen <soren@canonical.com>2009-08-11 08:20:55 +0200
commit6103a0b6567f1a3bdcbac7fd005670676d61ddae (patch)
treefa127c25cae1ec93d37609dd8d4293708f3a6dab /ec2-set-defaults.py
parentd85c3f27482620927de6946e2e8d24c1dc31dfd2 (diff)
downloadvyos-cloud-init-6103a0b6567f1a3bdcbac7fd005670676d61ddae.tar.gz
vyos-cloud-init-6103a0b6567f1a3bdcbac7fd005670676d61ddae.zip
Remove call to update-motd from the init script. It is Ubuntu specific (and is possibly not even needed there)
Fix a bit of fallout due to code shuffling between EC2Init, ec2-set-apt-sources, and ec2-set-defaults.
Diffstat (limited to 'ec2-set-defaults.py')
-rwxr-xr-xec2-set-defaults.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/ec2-set-defaults.py b/ec2-set-defaults.py
index 878d4889..0e0d4843 100755
--- a/ec2-set-defaults.py
+++ b/ec2-set-defaults.py
@@ -20,6 +20,7 @@
#
import subprocess
+from Cheetah.Template import Template
import ec2init
@@ -39,13 +40,13 @@ def apply_locale(locale):
subprocess.Popen(['locale-gen', locale]).communicate()
subprocess.Popen(['update-locale', locale]).communicate()
-def generate_sources_list(self, mirror)
+def generate_sources_list(mirror):
stdout, stderr = subprocess.Popen(['lsb_release', '-cs'], stdout=subprocess.PIPE).communicate()
codename = stdout.strip()
mp = { 'mirror' : mirror, 'codename' : codename }
t = Template(file='/etc/ec2-init/templates/sources.list.tmpl', searchList=[mp])
- f = open(SOURCES_LIST, 'w')
+ f = open('/etc/apt/sources.list', 'w')
f.write(t.respond())
f.close()