summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog10
-rwxr-xr-xec2-fetch-credentials.py7
-rwxr-xr-xec2-set-apt-sources.py12
3 files changed, 23 insertions, 6 deletions
diff --git a/debian/changelog b/debian/changelog
index 1751387c..1a80137f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,13 @@
+ec2-init (0.3.3ubuntu2) jaunty; urgency=low
+
+ * debian/ec2-set-apt-sources.py:
+ - Use the ec2 mirrors. (LP: #317065, #333897)
+ - Update the /etc/apt/sources.list (LP: #333904)
+ * debian/ec2-fetch-credentials.py:
+ - Better error checking (LP: #325067)
+
+ -- Chuck Short <zulcss@ubuntu.com> Tue, 24 Feb 2009 14:02:37 -0500
+
ec2-init (0.3.3ubuntu1) jaunty; urgency=low
* debian/init: Fix init script.
diff --git a/ec2-fetch-credentials.py b/ec2-fetch-credentials.py
index 1e91bef8..e8216ec4 100755
--- a/ec2-fetch-credentials.py
+++ b/ec2-fetch-credentials.py
@@ -37,6 +37,9 @@ os.umask(077)
if not os.path.exists('/home/ubuntu/.ssh'):
os.mkdir('/home/ubuntu/.ssh')
+if not os.path.exists('/root/.ssh'):
+ os.mkdir('/root/.ssh')
+
fp = open('/home/ubuntu/.ssh/authorized_keys', 'a')
fp.write(''.join(['%s\n' % key for key in keys]))
fp.close()
@@ -44,6 +47,6 @@ fp.close()
os.system('chown -R ubuntu:ubuntu /home/ubuntu/.ssh')
fp = open('/root/.ssh/authorized_keys', 'a')
-fp.write("command=\"echo;echo \'Please use the \"ubuntu\" user to login on this host instead of \"root\".\'echo;sleep 10\"")
-fp.write('',join(['%s\n' % key for key in keys]))
+fp.write("command=\"echo \'Please ssh to the ubuntu user on this host instead of root\';echo;sleep 10\" ")
+fp.write(''.join(['%s\n' % key for key in keys]))
fp.close()
diff --git a/ec2-set-apt-sources.py b/ec2-set-apt-sources.py
index d6535013..15643fb2 100755
--- a/ec2-set-apt-sources.py
+++ b/ec2-set-apt-sources.py
@@ -25,7 +25,7 @@ from configobj import ConfigObj
api_ver = '2008-02-01'
metadata = None
-filename='/etc/ec2/ec2-init.cfg'
+filename='/etc/ec2-init/ec2-config.cfg'
base_url = 'http://169.254.169.254/%s/meta-data' % api_ver
zone = urllib.urlopen('%s/placement/availability-zone' % base_url).read()
@@ -39,7 +39,11 @@ config = ConfigObj(filename)
distro = config['distro']
f = open("/var/run/ec2/sources.list", "w")
-f.write('deb %s %s main universe\n' % (archive,distro))
-f.write('deb %s %s-updates main restricted universe\n' % (archive,distro))
+f.write('deb %s %s main universe\n' % (archive,distro))
+f.write('deb-src %s %s main universe\n' % (archive,distro))
+f.write('deb %s %s-updates main universe\n' % (archive,distro))
+f.write('deb http://security.ubuntu.com/ubuntu intrepid-security main universe\n')
+f.write('deb-src http://security.ubuntu.com/ubuntu intrepid-security main universe\n')
f.close()
-os.system("ln -s /var/run/ec2/sources.list /etc/apt/sources.list.d/amazon.list")
+os.system("mv /etc/apt/sources.list /etc/apt/sources.list-ec2-init")
+os.system("ln -s /var/run/ec2/sources.list /etc/apt/sources.list")