diff options
-rw-r--r-- | debian/changelog | 14 | ||||
-rw-r--r-- | debian/ec2-config.cfg | 2 | ||||
-rw-r--r-- | debian/ec2-init.rightscale-init.init | 24 | ||||
-rwxr-xr-x | debian/rules | 3 | ||||
-rwxr-xr-x | ec2-fetch-credentials.py | 5 | ||||
-rwxr-xr-x | ec2-set-apt-sources.py | 1 | ||||
-rwxr-xr-x | ec2-set-defaults.py | 12 |
7 files changed, 33 insertions, 28 deletions
diff --git a/debian/changelog b/debian/changelog index 814c6a7b..349e4add 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,17 @@ +ec2-init (0.3.3ubuntu6) jaunty; urgency=low + + * Set the configuration file to jaunty. + * ec2-fetch-credentials: Fix typo. + * ec2-set-defaults.py: + - Remove timezone change when booting the instance. + - Redirect output to /dev/null. + * ec2-set-apt-sources.py: + - Run apt-get update after the /etc/apt/sources.list and + redirect the output to /dev/null. + * rightscale-init: Updated rightscale-init + + -- Chuck Short <zulcss@ubuntu.com> Thu, 19 Mar 2009 20:52:59 -0400 + ec2-init (0.3.3ubuntu5) jaunty; urgency=low * debian/ec2-config.cfg: diff --git a/debian/ec2-config.cfg b/debian/ec2-config.cfg index cd38d598..ebf5eb69 100644 --- a/debian/ec2-config.cfg +++ b/debian/ec2-config.cfg @@ -1,3 +1,3 @@ user="ubuntu" -distro="intrepid" +distro="jaunty" DISABLE_ROOT="1" diff --git a/debian/ec2-init.rightscale-init.init b/debian/ec2-init.rightscale-init.init index 4a1c52af..10ba39d3 100644 --- a/debian/ec2-init.rightscale-init.init +++ b/debian/ec2-init.rightscale-init.init @@ -1,16 +1,7 @@ -#!/bin/sh - -### BEGIN INIT INFO -# Provides: rightscale -# Required-Start: -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 1 -# Sort-Description: Setup Righscale - +#!/bin/bash +# # This script will configure an Ubuntu server for use with RightScale - -set -e +# start() { ## First check to see if we were launched through RightScale. Exit and remove if not... @@ -32,7 +23,7 @@ start() { echo "Installing necessary packages..." export DEBIAN_FRONTEND=NONINTERACTIVE apt-get update - apt-get install -y binutils sysv-rc-conf unzip ruby1.8-dev autoconf automake libtool logrotate rsync openssl ca-certificates + apt-get install -y binutils ruby1.8 sysv-rc-conf unzip ruby1.8-dev build-essential autoconf automake libtool logrotate rsync openssl ca-certificates libopenssl-ruby1.8 ## Add rightscale customizations echo "Installing RightScale" @@ -90,10 +81,9 @@ stop() { } remove() { - my_name=`basename $0` - init_script_name=${my_name:3} - update-rc.d -f $init_script_name remove - rm -f /etc/init.d/$init_script_name + my_name=`readlink -e $0` + update-rc.d -f `basename $my_name` remove + rm -f $my_name } diff --git a/debian/rules b/debian/rules index 4d362f5b..646b11f5 100755 --- a/debian/rules +++ b/debian/rules @@ -13,4 +13,5 @@ build/ec2-init:: install -m 755 ec2-set-hostname.py debian/tmp/usr/sbin/ec2-set-hostname install -m 755 ec2-set-apt-sources.py debian/tmp/usr/sbin/ec2-set-apt-sources install -m755 ec2-get-info.py debian/tmp/usr/sbin/ec2-get-info - dh_installinit -p ec2-init --name rightscale-init -- defaults 20 21 + install -m755 ec2-set-defaults.py debian/tmp/usr/sbin/ec2-set-defaults + dh_installiniti -p ec2-init --name rightscale-init -- defaults 99 09 diff --git a/ec2-fetch-credentials.py b/ec2-fetch-credentials.py index 33b4fb02..52176003 100755 --- a/ec2-fetch-credentials.py +++ b/ec2-fetch-credentials.py @@ -48,8 +48,11 @@ def setup_user_keys(k,user): def setup_root_user(k,root_config): if root_config == "1": + if not os.path.exists('/root/.ssh'): + os.mkdir('/root/.ssh/') + fp = open('/root/.ssh/authorized_keys', 'a') - fp.write("command=\"echo \'Please ssh to the ubuntu user on this host instead of root\';echo;sleep 10\" ") + fp.write("command=\"echo \'Please login as the ubuntu user rather than root user.\';echo;sleep 10\" ") fp.write(''.join(['%s\n' % key for key in keys])) fp.close() elif root_config == "0": diff --git a/ec2-set-apt-sources.py b/ec2-set-apt-sources.py index 15643fb2..2709d6ab 100755 --- a/ec2-set-apt-sources.py +++ b/ec2-set-apt-sources.py @@ -47,3 +47,4 @@ f.write('deb-src http://security.ubuntu.com/ubuntu intrepid-security main univer f.close() 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") +os.system("apt-get update 2>&1 > /dev/null") diff --git a/ec2-set-defaults.py b/ec2-set-defaults.py index 129c46db..d7de9f1f 100755 --- a/ec2-set-defaults.py +++ b/ec2-set-defaults.py @@ -34,18 +34,14 @@ if zone.startswith("us"): elif zone.startswith("eu"): archive = "http://eu.ec2.archive.ubuntu.com/ubuntu" -def set_utc_clock(): - os.system('ln -s -f /usr/share/zoneinfo/UTC /etc/localime') - def set_language(location): if location.startswith("us"): lang='en_US.UTF-8' - os.system('locale-gen %s' %(lang)) - os.system('update-locale %s' %(lang)) + os.system('locale-gen %s 2>&1 > /dev/null' %(lang)) + os.system('update-locale %s 2>&1 > /dev/null' %(lang)) elif location.startswith("eu"): lang='en_GB.UTF-8' - os.system('locale-gen %s' %(lang)) - os.system('update-locale %s' %(lang)) + os.system('locale-gen %s 2>&1 > /dev/null' %(lang)) + os.system('update-locale %s 2>&1 > /dev/null' %(lang)) -set_utc_clock() set_language(zone) |