diff options
Diffstat (limited to 'debian')
-rw-r--r-- | debian/changelog | 6 | ||||
-rw-r--r-- | debian/compat | 1 | ||||
-rw-r--r-- | debian/control | 13 | ||||
-rw-r--r-- | debian/copyright | 27 | ||||
-rw-r--r-- | debian/init | 61 | ||||
-rw-r--r-- | debian/install | 1 | ||||
-rwxr-xr-x | debian/rules | 10 |
7 files changed, 119 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog new file mode 100644 index 00000000..7a90e732 --- /dev/null +++ b/debian/changelog @@ -0,0 +1,6 @@ +ec2-init (0.1) intrepid; urgency=low + + * Initial release (LP: #269434). + + -- Soren Hansen <soren@ubuntu.com> Fri, 12 Sep 2008 15:30:32 +0200 + diff --git a/debian/compat b/debian/compat new file mode 100644 index 00000000..7ed6ff82 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +5 diff --git a/debian/control b/debian/control new file mode 100644 index 00000000..c579e89e --- /dev/null +++ b/debian/control @@ -0,0 +1,13 @@ +Source: ec2-init +Section: admin +Priority: extra +Maintainer: Soren Hansen <soren@ubuntu.com> +Build-Depends: cdbs, debhelper (>= 5) +Standards-Version: 3.8.0 + +Package: ec2-init +Architecture: all +Depends: python, procps +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/copyright b/debian/copyright new file mode 100644 index 00000000..d02e3598 --- /dev/null +++ b/debian/copyright @@ -0,0 +1,27 @@ +This package was debianized by Soren Hansen <soren@ubuntu.com> on +Thu, 04 Sep 2008 12:49:15 +0200. + +Upstream Author: + + Soren Hansen <soren@canonical.com> + +Copyright: + + Copyright 2008 Canonical Ltd. + +License: + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <http://www.gnu.org/licenses/>. + +The complete text of the GPL version 3 can be seen in /usr/share/common-licenses/GPL. diff --git a/debian/init b/debian/init new file mode 100644 index 00000000..d084c568 --- /dev/null +++ b/debian/init @@ -0,0 +1,61 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: ec2-init +# Required-Start: $network $local_fs +# Required-Stop: +# Should-Start: $named +# Should-Stop: +# Default-Start: S +# Default-Stop: 1 +# Short-Description: Initialises system for use on Amazon EC2 +# Description: Fetches login credentials and handles various quirks +### END INIT INFO + +PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin +NAME=ec2-init + +. /lib/lsb/init-functions + +case "$1" in + start) + log_daemon_msg "Running EC2 user data" + if ec2-run-user-data 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 + then + log_end_msg 0 + else + log_end_msg 1 + fi + + if pgrep nash-hotplug > /dev/null + then + log_daemon_msg "Killing nash-hotplug" + if pkill nash-hotplug; + then + log_end_msg 0 + else + log_end_msg 1 + fi + fi + ;; + stop) + exit 0 + ;; + restart|force-reload) + exec $0 start + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|force-stop|restart|force-reload|status}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/debian/install b/debian/install new file mode 100644 index 00000000..54a21487 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +debian/tmp/usr/sbin/* diff --git a/debian/rules b/debian/rules new file mode 100755 index 00000000..8c9f1074 --- /dev/null +++ b/debian/rules @@ -0,0 +1,10 @@ +#!/usr/bin/make -f + +include /usr/share/cdbs/1/rules/debhelper.mk + +DEB_UPDATE_RCD_PARAMS:=start 90 S . + +build/ec2-init:: + install -d debian/tmp/usr/sbin + 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 |