From b7d4c2c4a45c83d7e4a0c5ca7271c4ae13cd1f84 Mon Sep 17 00:00:00 2001 From: Chuck Short Date: Wed, 14 Jan 2009 00:57:58 +0000 Subject: * debian/init: Run fetch-credentials before anything else. (LP: #308533) * Add ec2-set-hostname.py: Queries ec2 metdada for public-hostname and then sets it (LP: #316201) --- debian/init | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'debian/init') diff --git a/debian/init b/debian/init index d084c568..e1deee83 100644 --- a/debian/init +++ b/debian/init @@ -18,16 +18,16 @@ NAME=ec2-init case "$1" in start) - log_daemon_msg "Running EC2 user data" - if ec2-run-user-data 2> /dev/null + log_daemon_msg "Fetching EC2 login credentials" + if ec2-fetch-credentials 2> /dev/null then log_end_msg 0 else log_end_msg 1 fi - log_daemon_msg "Fetching EC2 login credentials" - if ec2-fetch-credentials 2> /dev/null + log_daemon_msg "Running EC2 user data" + if ec2-run-user-data 2> /dev/null then log_end_msg 0 else @@ -44,6 +44,14 @@ case "$1" in log_end_msg 1 fi fi + log_daemon_msg "Setting hostname to EC2 public_hostname" + if ec2-set-hostname 2> /dev/null + then + log_end_msg 0 + else + log_end_msg 1 + fi + ;; stop) exit 0 -- cgit v1.2.3