summaryrefslogtreecommitdiff
path: root/debian
diff options
context:
space:
mode:
authorChuck Short <zulcss@ubuntu.com>2009-02-09 19:12:09 +0000
committerBazaar Package Importer <jamesw@ubuntu.com>2009-02-09 19:12:09 +0000
commit4685dd287c9eea18dc18bac1260b7a1169271f78 (patch)
tree79738235d552663619932980d46f9a9e004aeb2e /debian
parent40bc760f17a67700ad19b0d2250deec4e5e06954 (diff)
downloadvyos-cloud-init-4685dd287c9eea18dc18bac1260b7a1169271f78.tar.gz
vyos-cloud-init-4685dd287c9eea18dc18bac1260b7a1169271f78.zip
* ec2-set-apt-sources.py
- Determine the zone that the user is in and generate a /etc/apt/sources.list.d/ based on that. * debian/init: - Check to see if there is an /var/run/ec2 and create it if it doesnt exist. - Start ec2-set-apt-sources at first bootup. * debian/rules: - Install ec2-set-apt-sources. * debian/control: - Add python-configobj as a dependency. * debian/{install,dirs} - Create an /etc/ec2-init to read the configuration file and install it.
Diffstat (limited to 'debian')
-rw-r--r--debian/changelog18
-rw-r--r--debian/control2
-rw-r--r--debian/dirs1
-rw-r--r--debian/ec2-config.cfg2
-rw-r--r--debian/init11
-rw-r--r--debian/install1
-rwxr-xr-xdebian/rules2
7 files changed, 36 insertions, 1 deletions
diff --git a/debian/changelog b/debian/changelog
index 1f720438..643e509b 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+ec2-init (0.3.3) jaunty; urgency=low
+
+ * ec2-set-apt-sources.py
+ - Determine the zone that the user is in and generate
+ a /etc/apt/sources.list.d/ based on that.
+ * debian/init:
+ - Check to see if there is an /var/run/ec2 and create
+ it if it doesnt exist.
+ - Start ec2-set-apt-sources at first bootup.
+ * debian/rules:
+ - Install ec2-set-apt-sources.
+ * debian/control:
+ - Add python-configobj as a dependency.
+ * debian/{install,dirs}
+ - Create an /etc/ec2-init to read the configuration file and install it.
+
+ -- Chuck Short <zulcss@ubuntu.com> Mon, 09 Feb 2009 10:35:56 -0500
+
ec2-init (0.3.2) jaunty; urgency=low
* debian/init:
diff --git a/debian/control b/debian/control
index 4505cbaf..2eb50d17 100644
--- a/debian/control
+++ b/debian/control
@@ -7,7 +7,7 @@ Standards-Version: 3.8.0
Package: ec2-init
Architecture: i386 amd64
-Depends: python, procps
+Depends: python, procps, python-configobj
Description: Init scripts for EC2 instances
EC2 instances need special scripts to run during initialisation
to retrieve and install ssh keys and to let the user run various scripts.
diff --git a/debian/dirs b/debian/dirs
index 19be79b3..3c349733 100644
--- a/debian/dirs
+++ b/debian/dirs
@@ -1,2 +1,3 @@
var/ec2
usr/sbin
+etc/ec2-init
diff --git a/debian/ec2-config.cfg b/debian/ec2-config.cfg
new file mode 100644
index 00000000..aa6757e2
--- /dev/null
+++ b/debian/ec2-config.cfg
@@ -0,0 +1,2 @@
+user="ubuntu"
+distro="jaunty"
diff --git a/debian/init b/debian/init
index e28edd06..1e5a36c1 100644
--- a/debian/init
+++ b/debian/init
@@ -16,6 +16,10 @@ NAME=ec2-init
. /lib/lsb/init-functions
+if [ ! -d /var/run/ec2 ]; then
+ mkdir /var/run/ec2
+fi
+
case "$1" in
start)
log_daemon_msg "Fetching EC2 login credentials"
@@ -51,6 +55,13 @@ case "$1" in
else
log_end_msg 1
fi
+ log_daemon_msg "Determining EC2 availability zone"
+ if ec2-set-apt-sources.py 2> /dev/null
+ then
+ log_end_msg 0
+ else
+ log_end_msg 1
+ fi
;;
stop)
diff --git a/debian/install b/debian/install
index 54a21487..c9b3c391 100644
--- a/debian/install
+++ b/debian/install
@@ -1 +1,2 @@
debian/tmp/usr/sbin/*
+debian/ec2-config.cfg etc/ec2-init
diff --git a/debian/rules b/debian/rules
index f3f8d30f..dbdd8253 100755
--- a/debian/rules
+++ b/debian/rules
@@ -7,6 +7,8 @@ DEB_UPDATE_RCD_PARAMS:= start 90 2 3 4 5 . stop 20 1 .
build/ec2-init::
install -d debian/tmp/usr/sbin
mkdir -p debian/tmp/var/ec2
+ mkdir -p debian/tmp/etc/ec2-init
install -m 775 ec2-fetch-credentials.py debian/tmp/usr/sbin/ec2-fetch-credentials
install -m 775 ec2-run-user-data.py debian/tmp/usr/sbin/ec2-run-user-data
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