From 40bc760f17a67700ad19b0d2250deec4e5e06954 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 4 Feb 2009 17:54:00 +0000 Subject: * debian/init: - Remove already ran detection - Log the running of ec2-run-user-data to /var/log/ec2-user-data.log * ec2-set-hostname.py: - set hostname to the Ec2 local-hostname - Update the /etc/hosts to change the ubuntu hostname to the public hostname. * ec2-fetch-credentials: - Copy the ssh keys to the ubuntu user. - Setup authorized keys for root to tell the user to login as the ubuntu user when they try to connect. * ec2-run-user-data: - Create an .already-ran file to check to see if ec2-run-user-data already ran. - Save the ec2-run-user-data script in /var/ec2. --- debian/init | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) (limited to 'debian/init') diff --git a/debian/init b/debian/init index 24db3845..e28edd06 100644 --- a/debian/init +++ b/debian/init @@ -1,7 +1,7 @@ #!/bin/sh ### BEGIN INIT INFO # Provides: ec2-init -# Required-Start: $network $local_fs +# Required-Start: $network $local_fs $ssh # Required-Stop: # Should-Start: $named # Should-Stop: @@ -27,17 +27,11 @@ case "$1" in fi log_daemon_msg "Running EC2 user data" - if [ -f /var/ec2/.already_ran ] + if ec2-run-user-data 2>&1 | tee /var/log/ec2-user-data.log then - echo "Already ran"; + log_end_msg 0 else - if ec2-run-user-data 2> /dev/null - then - log_end_msg 0 - touch /var/ec2/.already_ran - else - log_end_msg 1 - fi + log_end_msg 1 fi if pgrep nash-hotplug > /dev/null -- cgit v1.2.3