summaryrefslogtreecommitdiff
path: root/debian/init
diff options
context:
space:
mode:
authorChuck Short <zulcss@ubuntu.com>2009-02-04 17:54:00 +0000
committerBazaar Package Importer <jamesw@ubuntu.com>2009-02-04 17:54:00 +0000
commit40bc760f17a67700ad19b0d2250deec4e5e06954 (patch)
tree6f803f5fe1adcb08268e4037e349513aa7d83f83 /debian/init
parentdb066b9caf770d7cdcf9f46f159249d22db99142 (diff)
downloadvyos-cloud-init-40bc760f17a67700ad19b0d2250deec4e5e06954.tar.gz
vyos-cloud-init-40bc760f17a67700ad19b0d2250deec4e5e06954.zip
* 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.
Diffstat (limited to 'debian/init')
-rw-r--r--debian/init14
1 files changed, 4 insertions, 10 deletions
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