diff options
author | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-09-05 13:11:09 +0200 |
---|---|---|
committer | Vlastimil Holer <vlastimil.holer@gmail.com> | 2013-09-05 13:11:09 +0200 |
commit | 744c779182cba32314f8435660a61c2711cb9f54 (patch) | |
tree | 7871342bf0b122217b51493286bac982313b48da /sysvinit/debian/cloud-config | |
parent | 8a2a88e0bb4520eabe99b6686413a548f3d59652 (diff) | |
parent | 1d27cd75eaaeef7b72f3be77de24da815c82a825 (diff) | |
download | vyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.tar.gz vyos-cloud-init-744c779182cba32314f8435660a61c2711cb9f54.zip |
Merged trunk lp:cloud-init
Diffstat (limited to 'sysvinit/debian/cloud-config')
-rw-r--r-- | sysvinit/debian/cloud-config | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/sysvinit/debian/cloud-config b/sysvinit/debian/cloud-config new file mode 100644 index 00000000..53322748 --- /dev/null +++ b/sysvinit/debian/cloud-config @@ -0,0 +1,64 @@ +#! /bin/sh +### BEGIN INIT INFO +# Provides: cloud-config +# Required-Start: cloud-init cloud-init-local +# Required-Stop: +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Cloud init modules --mode config +# Description: Cloud configuration initialization +### END INIT INFO + +# Authors: Julien Danjou <acid@debian.org> +# Juerg Haefliger <juerg.haefliger@hp.com> +# Thomas Goirand <zigo@debian.org> + +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="Cloud service" +NAME=cloud-init +DAEMON=/usr/bin/$NAME +DAEMON_ARGS="modules --mode config" +SCRIPTNAME=/etc/init.d/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r /etc/default/$NAME ] && . /etc/default/$NAME + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +if init_is_upstart; then + case "$1" in + stop) + exit 0 + ;; + *) + exit 1 + ;; + esac +fi + +case "$1" in +start) + log_daemon_msg "Starting $DESC" "$NAME" + $DAEMON ${DAEMON_ARGS} + case "$?" in + 0|1) log_end_msg 0 ;; + 2) log_end_msg 1 ;; + esac +;; +stop|restart|force-reload) + echo "Error: argument '$1' not supported" >&2 + exit 3 +;; +*) + echo "Usage: $SCRIPTNAME {start}" >&2 + exit 3 +;; +esac + +: |