diff options
Diffstat (limited to 'sysvinit')
-rw-r--r-- | sysvinit/debian/cloud-config | 64 | ||||
-rw-r--r-- | sysvinit/debian/cloud-final | 66 | ||||
-rwxr-xr-x | sysvinit/debian/cloud-init | 64 | ||||
-rw-r--r-- | sysvinit/debian/cloud-init-local | 63 | ||||
-rwxr-xr-x | sysvinit/freebsd/cloudconfig | 35 | ||||
-rwxr-xr-x | sysvinit/freebsd/cloudfinal | 35 | ||||
-rwxr-xr-x | sysvinit/freebsd/cloudinit | 35 | ||||
-rwxr-xr-x | sysvinit/freebsd/cloudinitlocal | 35 | ||||
-rw-r--r-- | sysvinit/gentoo/cloud-config | 13 | ||||
-rw-r--r-- | sysvinit/gentoo/cloud-final | 11 | ||||
-rw-r--r-- | sysvinit/gentoo/cloud-init | 12 | ||||
-rw-r--r-- | sysvinit/gentoo/cloud-init-local | 13 | ||||
-rwxr-xr-x | sysvinit/redhat/cloud-config | 121 | ||||
-rwxr-xr-x | sysvinit/redhat/cloud-final | 121 | ||||
-rwxr-xr-x | sysvinit/redhat/cloud-init | 121 | ||||
-rwxr-xr-x | sysvinit/redhat/cloud-init-local | 124 |
16 files changed, 0 insertions, 933 deletions
diff --git a/sysvinit/debian/cloud-config b/sysvinit/debian/cloud-config deleted file mode 100644 index 53322748..00000000 --- a/sysvinit/debian/cloud-config +++ /dev/null @@ -1,64 +0,0 @@ -#! /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 - -: diff --git a/sysvinit/debian/cloud-final b/sysvinit/debian/cloud-final deleted file mode 100644 index 55afc8b0..00000000 --- a/sysvinit/debian/cloud-final +++ /dev/null @@ -1,66 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: cloud-final -# Required-Start: $all cloud-config -# Required-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Cloud init modules final jobs -# Description: This runs the cloud configuration initialization "final" jobs -# and can be seen as the traditional "rc.local" time for the cloud. -# It runs after all cloud-config jobs are run -### 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 final" -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 - -: diff --git a/sysvinit/debian/cloud-init b/sysvinit/debian/cloud-init deleted file mode 100755 index 48fa0423..00000000 --- a/sysvinit/debian/cloud-init +++ /dev/null @@ -1,64 +0,0 @@ -#! /bin/sh -### BEGIN INIT INFO -# Provides: cloud-init -# Required-Start: $local_fs $remote_fs $syslog $network cloud-init-local -# Required-Stop: $remote_fs -# X-Start-Before: sshd -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: Cloud init -# Description: Cloud configuration initialization -### END INIT INFO - -# Authors: Julien Danjou <acid@debian.org> -# Thomas Goirand <zigo@debian.org> - -PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="Cloud service" -NAME=cloud-init -DAEMON=/usr/bin/$NAME -DAEMON_ARGS="init" -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 - -: diff --git a/sysvinit/debian/cloud-init-local b/sysvinit/debian/cloud-init-local deleted file mode 100644 index 802ee8e9..00000000 --- a/sysvinit/debian/cloud-init-local +++ /dev/null @@ -1,63 +0,0 @@ -#! /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 - -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 - -: diff --git a/sysvinit/freebsd/cloudconfig b/sysvinit/freebsd/cloudconfig deleted file mode 100755 index 01bc061e..00000000 --- a/sysvinit/freebsd/cloudconfig +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# PROVIDE: cloudconfig -# REQUIRE: cloudinit cloudinitlocal -# BEFORE: cloudfinal - -. /etc/rc.subr - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg - -name="cloudconfig" -command="/usr/local/bin/cloud-init" -start_cmd="cloudconfig_start" -stop_cmd=":" -rcvar="cloudinit_enable" -start_precmd="cloudinit_override" -start_cmd="cloudconfig_start" - -cloudinit_override() -{ - # If there exist sysconfig/defaults variable override files use it... - if [ -f /etc/defaults/cloud-init ]; then - . /etc/defaults/cloud-init - fi -} - -cloudconfig_start() -{ - echo "${command} starting" - ${command} modules --mode config -} - -load_rc_config $name -run_rc_command "$1" diff --git a/sysvinit/freebsd/cloudfinal b/sysvinit/freebsd/cloudfinal deleted file mode 100755 index 1b487aa0..00000000 --- a/sysvinit/freebsd/cloudfinal +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# PROVIDE: cloudfinal -# REQUIRE: LOGIN cloudinit cloudconfig cloudinitlocal -# REQUIRE: cron mail sshd swaplate - -. /etc/rc.subr - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg - -name="cloudfinal" -command="/usr/local/bin/cloud-init" -start_cmd="cloudfinal_start" -stop_cmd=":" -rcvar="cloudinit_enable" -start_precmd="cloudinit_override" -start_cmd="cloudfinal_start" - -cloudinit_override() -{ - # If there exist sysconfig/defaults variable override files use it... - if [ -f /etc/defaults/cloud-init ]; then - . /etc/defaults/cloud-init - fi -} - -cloudfinal_start() -{ - echo -n "${command} starting" - ${command} modules --mode final -} - -load_rc_config $name -run_rc_command "$1" diff --git a/sysvinit/freebsd/cloudinit b/sysvinit/freebsd/cloudinit deleted file mode 100755 index 862eeab4..00000000 --- a/sysvinit/freebsd/cloudinit +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# PROVIDE: cloudinit -# REQUIRE: FILESYSTEMS NETWORKING cloudinitlocal -# BEFORE: cloudconfig cloudfinal - -. /etc/rc.subr - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg - -name="cloudinit" -command="/usr/local/bin/cloud-init" -start_cmd="cloudinit_start" -stop_cmd=":" -rcvar="cloudinit_enable" -start_precmd="cloudinit_override" -start_cmd="cloudinit_start" - -cloudinit_override() -{ - # If there exist sysconfig/defaults variable override files use it... - if [ -f /etc/defaults/cloud-init ]; then - . /etc/defaults/cloud-init - fi -} - -cloudinit_start() -{ - echo -n "${command} starting" - ${command} init -} - -load_rc_config $name -run_rc_command "$1" diff --git a/sysvinit/freebsd/cloudinitlocal b/sysvinit/freebsd/cloudinitlocal deleted file mode 100755 index fb342a0f..00000000 --- a/sysvinit/freebsd/cloudinitlocal +++ /dev/null @@ -1,35 +0,0 @@ -#!/bin/sh - -# PROVIDE: cloudinitlocal -# REQUIRE: mountcritlocal -# BEFORE: NETWORKING FILESYSTEMS cloudinit cloudconfig cloudfinal - -. /etc/rc.subr - -PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin" -export CLOUD_CFG=/usr/local/etc/cloud/cloud.cfg - -name="cloudinitlocal" -command="/usr/local/bin/cloud-init" -start_cmd="cloudlocal_start" -stop_cmd=":" -rcvar="cloudinit_enable" -start_precmd="cloudinit_override" -start_cmd="cloudlocal_start" - -cloudinit_override() -{ - # If there exist sysconfig/defaults variable override files use it... - if [ -f /etc/defaults/cloud-init ]; then - . /etc/defaults/cloud-init - fi -} - -cloudlocal_start() -{ - echo -n "${command} starting" - ${command} init --local -} - -load_rc_config $name -run_rc_command "$1" diff --git a/sysvinit/gentoo/cloud-config b/sysvinit/gentoo/cloud-config deleted file mode 100644 index b0fa786d..00000000 --- a/sysvinit/gentoo/cloud-config +++ /dev/null @@ -1,13 +0,0 @@ -#!/sbin/runscript - -depend() { - after cloud-init-local - after cloud-init - before cloud-final - provide cloud-config -} - -start() { - cloud-init modules --mode config - eend 0 -} diff --git a/sysvinit/gentoo/cloud-final b/sysvinit/gentoo/cloud-final deleted file mode 100644 index b457a354..00000000 --- a/sysvinit/gentoo/cloud-final +++ /dev/null @@ -1,11 +0,0 @@ -#!/sbin/runscript - -depend() { - after cloud-config - provide cloud-final -} - -start() { - cloud-init modules --mode final - eend 0 -} diff --git a/sysvinit/gentoo/cloud-init b/sysvinit/gentoo/cloud-init deleted file mode 100644 index 9ab64ad8..00000000 --- a/sysvinit/gentoo/cloud-init +++ /dev/null @@ -1,12 +0,0 @@ -#!/sbin/runscript -# add depends for network, dns, fs etc -depend() { - after cloud-init-local - before cloud-config - provide cloud-init -} - -start() { - cloud-init init - eend 0 -} diff --git a/sysvinit/gentoo/cloud-init-local b/sysvinit/gentoo/cloud-init-local deleted file mode 100644 index 9d47263e..00000000 --- a/sysvinit/gentoo/cloud-init-local +++ /dev/null @@ -1,13 +0,0 @@ -#!/sbin/runscript - -depend() { - after localmount - after netmount - before cloud-init - provide cloud-init-local -} - -start() { - cloud-init init --local - eend 0 -} diff --git a/sysvinit/redhat/cloud-config b/sysvinit/redhat/cloud-config deleted file mode 100755 index ad8ed831..00000000 --- a/sysvinit/redhat/cloud-config +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# -# Copyright (C) 2012 Yahoo! Inc. -# -# Author: Joshua Harlow <harlowja@yahoo-inc.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. -# -# 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/>. -# - -# See: http://wiki.debian.org/LSBInitScripts -# See: http://tiny.cc/czvbgw -# See: http://www.novell.com/coolsolutions/feature/15380.html -# Also based on dhcpd in RHEL (for comparison) - -### BEGIN INIT INFO -# Provides: cloud-config -# Required-Start: cloud-init cloud-init-local -# Should-Start: $time -# Required-Stop: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: The config cloud-init job -# Description: Start cloud-init and runs the config phase -# and any associated config modules as desired. -### END INIT INFO - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - user had insufficient privileges -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signaling is not supported) are -# considered a success. - -RETVAL=0 - -prog="cloud-init" -cloud_init="/usr/bin/cloud-init" -conf="/etc/cloud/cloud.cfg" - -# If there exist sysconfig/default variable override files use it... -[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init -[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init - -start() { - [ -x $cloud_init ] || return 5 - [ -f $conf ] || return 6 - - echo -n $"Starting $prog: " - $cloud_init $CLOUDINITARGS modules --mode config - RETVAL=$? - return $RETVAL -} - -stop() { - echo -n $"Shutting down $prog: " - # No-op - RETVAL=7 - return $RETVAL -} - -case "$1" in - start) - start - RETVAL=$? - ;; - stop) - stop - RETVAL=$? - ;; - restart|try-restart|condrestart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - # - ## Note: try-restart is now part of LSB (as of 1.9). - ## RH has a similar command named condrestart. - start - RETVAL=$? - ;; - reload|force-reload) - # It does not support reload - RETVAL=3 - ;; - status) - echo -n $"Checking for service $prog:" - # Return value is slightly different for the status command: - # 0 - service up and running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running (unused) - # 4 - service status unknown :-( - # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) - RETVAL=3 - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|condrestart|restart|force-reload|reload}" - RETVAL=3 - ;; -esac - -exit $RETVAL diff --git a/sysvinit/redhat/cloud-final b/sysvinit/redhat/cloud-final deleted file mode 100755 index aeae8903..00000000 --- a/sysvinit/redhat/cloud-final +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# -# Copyright (C) 2012 Yahoo! Inc. -# -# Author: Joshua Harlow <harlowja@yahoo-inc.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. -# -# 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/>. -# - -# See: http://wiki.debian.org/LSBInitScripts -# See: http://tiny.cc/czvbgw -# See: http://www.novell.com/coolsolutions/feature/15380.html -# Also based on dhcpd in RHEL (for comparison) - -### BEGIN INIT INFO -# Provides: cloud-final -# Required-Start: $all cloud-config -# Should-Start: $time -# Required-Stop: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: The final cloud-init job -# Description: Start cloud-init and runs the final phase -# and any associated final modules as desired. -### END INIT INFO - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - user had insufficient privileges -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signaling is not supported) are -# considered a success. - -RETVAL=0 - -prog="cloud-init" -cloud_init="/usr/bin/cloud-init" -conf="/etc/cloud/cloud.cfg" - -# If there exist sysconfig/default variable override files use it... -[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init -[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init - -start() { - [ -x $cloud_init ] || return 5 - [ -f $conf ] || return 6 - - echo -n $"Starting $prog: " - $cloud_init $CLOUDINITARGS modules --mode final - RETVAL=$? - return $RETVAL -} - -stop() { - echo -n $"Shutting down $prog: " - # No-op - RETVAL=7 - return $RETVAL -} - -case "$1" in - start) - start - RETVAL=$? - ;; - stop) - stop - RETVAL=$? - ;; - restart|try-restart|condrestart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - # - ## Note: try-restart is now part of LSB (as of 1.9). - ## RH has a similar command named condrestart. - start - RETVAL=$? - ;; - reload|force-reload) - # It does not support reload - RETVAL=3 - ;; - status) - echo -n $"Checking for service $prog:" - # Return value is slightly different for the status command: - # 0 - service up and running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running (unused) - # 4 - service status unknown :-( - # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) - RETVAL=3 - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|condrestart|restart|force-reload|reload}" - RETVAL=3 - ;; -esac - -exit $RETVAL diff --git a/sysvinit/redhat/cloud-init b/sysvinit/redhat/cloud-init deleted file mode 100755 index c1c92ad0..00000000 --- a/sysvinit/redhat/cloud-init +++ /dev/null @@ -1,121 +0,0 @@ -#!/bin/sh - -# -# Copyright (C) 2012 Yahoo! Inc. -# -# Author: Joshua Harlow <harlowja@yahoo-inc.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. -# -# 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/>. -# - -# See: http://wiki.debian.org/LSBInitScripts -# See: http://tiny.cc/czvbgw -# See: http://www.novell.com/coolsolutions/feature/15380.html -# Also based on dhcpd in RHEL (for comparison) - -### BEGIN INIT INFO -# Provides: cloud-init -# Required-Start: $local_fs $network $named $remote_fs cloud-init-local -# Should-Start: $time -# Required-Stop: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: The initial cloud-init job (net and fs contingent) -# Description: Start cloud-init and runs the initialization phase -# and any associated initial modules as desired. -### END INIT INFO - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - user had insufficient privileges -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signaling is not supported) are -# considered a success. - -RETVAL=0 - -prog="cloud-init" -cloud_init="/usr/bin/cloud-init" -conf="/etc/cloud/cloud.cfg" - -# If there exist sysconfig/default variable override files use it... -[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init -[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init - -start() { - [ -x $cloud_init ] || return 5 - [ -f $conf ] || return 6 - - echo -n $"Starting $prog: " - $cloud_init $CLOUDINITARGS init - RETVAL=$? - return $RETVAL -} - -stop() { - echo -n $"Shutting down $prog: " - # No-op - RETVAL=7 - return $RETVAL -} - -case "$1" in - start) - start - RETVAL=$? - ;; - stop) - stop - RETVAL=$? - ;; - restart|try-restart|condrestart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - # - ## Note: try-restart is now part of LSB (as of 1.9). - ## RH has a similar command named condrestart. - start - RETVAL=$? - ;; - reload|force-reload) - # It does not support reload - RETVAL=3 - ;; - status) - echo -n $"Checking for service $prog:" - # Return value is slightly different for the status command: - # 0 - service up and running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running (unused) - # 4 - service status unknown :-( - # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) - RETVAL=3 - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|condrestart|restart|force-reload|reload}" - RETVAL=3 - ;; -esac - -exit $RETVAL diff --git a/sysvinit/redhat/cloud-init-local b/sysvinit/redhat/cloud-init-local deleted file mode 100755 index b9caedbd..00000000 --- a/sysvinit/redhat/cloud-init-local +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/sh - -# -# Copyright (C) 2012 Yahoo! Inc. -# -# Author: Joshua Harlow <harlowja@yahoo-inc.com> -# -# This program is free software: you can redistribute it and/or modify -# it under the terms of the GNU General Public License version 3, as -# published by the Free Software Foundation. -# -# 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/>. -# - -# See: http://wiki.debian.org/LSBInitScripts -# See: http://tiny.cc/czvbgw -# See: http://www.novell.com/coolsolutions/feature/15380.html -# Also based on dhcpd in RHEL (for comparison) - -# Bring this up before network, S10 -#chkconfig: 2345 09 91 - -### BEGIN INIT INFO -# Provides: cloud-init-local -# Required-Start: $local_fs -# Should-Start: $time -# Required-Stop: -# Should-Stop: -# Default-Start: 2 3 4 5 -# Default-Stop: 0 1 6 -# Short-Description: The initial cloud-init job (local fs contingent) -# Description: Start cloud-init and runs the initialization phases -# and any associated initial modules as desired. -### END INIT INFO - -# Return values acc. to LSB for all commands but status: -# 0 - success -# 1 - generic or unspecified error -# 2 - invalid or excess argument(s) -# 3 - unimplemented feature (e.g. "reload") -# 4 - user had insufficient privileges -# 5 - program is not installed -# 6 - program is not configured -# 7 - program is not running -# 8--199 - reserved (8--99 LSB, 100--149 distrib, 150--199 appl) -# -# Note that starting an already running service, stopping -# or restarting a not-running service as well as the restart -# with force-reload (in case signaling is not supported) are -# considered a success. - -RETVAL=0 - -prog="cloud-init" -cloud_init="/usr/bin/cloud-init" -conf="/etc/cloud/cloud.cfg" - -# If there exist sysconfig/default variable override files use it... -[ -f /etc/sysconfig/cloud-init ] && . /etc/sysconfig/cloud-init -[ -f /etc/default/cloud-init ] && . /etc/default/cloud-init - -start() { - [ -x $cloud_init ] || return 5 - [ -f $conf ] || return 6 - - echo -n $"Starting $prog: " - $cloud_init $CLOUDINITARGS init --local - RETVAL=$? - return $RETVAL -} - -stop() { - echo -n $"Shutting down $prog: " - # No-op - RETVAL=7 - return $RETVAL -} - -case "$1" in - start) - start - RETVAL=$? - ;; - stop) - stop - RETVAL=$? - ;; - restart|try-restart|condrestart) - ## Stop the service and regardless of whether it was - ## running or not, start it again. - # - ## Note: try-restart is now part of LSB (as of 1.9). - ## RH has a similar command named condrestart. - start - RETVAL=$? - ;; - reload|force-reload) - # It does not support reload - RETVAL=3 - ;; - status) - echo -n $"Checking for service $prog:" - # Return value is slightly different for the status command: - # 0 - service up and running - # 1 - service dead, but /var/run/ pid file exists - # 2 - service dead, but /var/lock/ lock file exists - # 3 - service not running (unused) - # 4 - service status unknown :-( - # 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.) - RETVAL=3 - ;; - *) - echo "Usage: $0 {start|stop|status|try-restart|condrestart|restart|force-reload|reload}" - RETVAL=3 - ;; -esac - -exit $RETVAL |