summaryrefslogtreecommitdiff
path: root/sysvinit/debian/cloud-init-local
diff options
context:
space:
mode:
authorJuerg Haefliger <juergh@gmail.com>2013-07-16 09:54:32 +0200
committerJuerg Haefliger <juergh@gmail.com>2013-07-16 09:54:32 +0200
commitbeb7cfbba437440811adb1b40a7882b15888b341 (patch)
treeddce8a1b16e11268c7db8ea82dd3eade6c90edfc /sysvinit/debian/cloud-init-local
parent812f82e7b3bad3f8127face552c76ef974b54661 (diff)
downloadvyos-cloud-init-beb7cfbba437440811adb1b40a7882b15888b341.tar.gz
vyos-cloud-init-beb7cfbba437440811adb1b40a7882b15888b341.zip
Add SysV init scripts for Debian
Diffstat (limited to 'sysvinit/debian/cloud-init-local')
-rwxr-xr-xsysvinit/debian/cloud-init-local52
1 files changed, 52 insertions, 0 deletions
diff --git a/sysvinit/debian/cloud-init-local b/sysvinit/debian/cloud-init-local
new file mode 100755
index 00000000..a1685c1e
--- /dev/null
+++ b/sysvinit/debian/cloud-init-local
@@ -0,0 +1,52 @@
+#! /bin/sh
+### BEGIN INIT INFO
+# Provides: cloud-init-local
+# Required-Start: $local_fs $remote_fs
+# Required-Stop:
+# Default-Start: 2 3 4 5
+# Default-Stop: 0 1 6
+# Short-Description: Cloud init local
+# Description: Cloud configuration initialization
+### END INIT INFO
+
+# Authors: Julien Danjou <acid@debian.org>
+# Juerg Haefliger <juerg.haefliger@hp.com>
+
+PATH=/sbin:/usr/sbin:/bin:/usr/bin
+DESC="Cloud service"
+NAME=cloud-init
+DAEMON=/usr/bin/$NAME
+DAEMON_ARGS="init --local"
+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
+
+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
+
+: