[Python-apps-team] Bug#709173:

Juerg Haefliger juergh at gmail.com
Mon May 27 06:48:49 UTC 2013


Patch to add missing sysvinit scripts:


diff --git a/cloud-init-0.7.1/debian/cloud-init.cloud-config.init
b/cloud-init-0.7.1/debian/cloud-init.cloud-config.init
new file mode 100644
index 0000000..23d050b
--- /dev/null
+++ b/cloud-init-0.7.1/debian/cloud-init.cloud-config.init
@@ -0,0 +1,55 @@
+#! /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 at debian.org>
+#          Juerg Haefliger <juerg.haefliger at hp.com>
+
+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
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# 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
+
+:
diff --git a/cloud-init-0.7.1/debian/cloud-init.cloud-final.init
b/cloud-init-0.7.1/debian/cloud-init.cloud-final.init
new file mode 100644
index 0000000..7de5c83
--- /dev/null
+++ b/cloud-init-0.7.1/debian/cloud-init.cloud-final.init
@@ -0,0 +1,55 @@
+#! /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 --mode final
+# Description:       Cloud configuration initialization
+### END INIT INFO
+
+# Authors: Julien Danjou <acid at debian.org>
+#          Juerg Haefliger <juerg.haefliger at hp.com>
+
+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
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# 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
+
+:
diff --git a/cloud-init-0.7.1/debian/cloud-init.cloud-init-local.init
b/cloud-init-0.7.1/debian/cloud-init.cloud-init-local.init
new file mode 100644
index 0000000..4331525
--- /dev/null
+++ b/cloud-init-0.7.1/debian/cloud-init.cloud-init-local.init
@@ -0,0 +1,55 @@
+#! /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 at debian.org>
+#          Juerg Haefliger <juerg.haefliger at 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
+
+# Load the VERBOSE setting and other rcS variables
+. /lib/init/vars.sh
+
+# 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
+
+:
diff --git a/cloud-init-0.7.1/debian/cloud-init.init
b/cloud-init-0.7.1/debian/cloud-init.init
index 3f33cb5..002bb32 100644
--- a/cloud-init-0.7.1/debian/cloud-init.init
+++ b/cloud-init-0.7.1/debian/cloud-init.init
@@ -1,7 +1,7 @@
 #! /bin/sh
 ### BEGIN INIT INFO
 # Provides:          cloud-init
-# Required-Start:    $remote_fs $syslog $network
+# Required-Start:    $local_fs $remote_fs $syslog $network cloud-init-local
 # Required-Stop:     $remote_fs
 # Default-Start:     2 3 4 5
 # Default-Stop:      0 1 6
@@ -35,7 +35,7 @@ SCRIPTNAME=/etc/init.d/$NAME
 case "$1" in
     start)
        log_daemon_msg "Starting $DESC" "$NAME"
-       "$DAEMON" "${DAEMON_ARGS}"
+       $DAEMON ${DAEMON_ARGS}
        case "$?" in
            0|1) log_end_msg 0 ;;
            2) log_end_msg 1 ;;
diff --git a/cloud-init-0.7.1/debian/rules b/cloud-init-0.7.1/debian/rules
index aeb1d42..1bf08ac 100755
--- a/cloud-init-0.7.1/debian/rules
+++ b/cloud-init-0.7.1/debian/rules
@@ -12,4 +12,7 @@ override_dh_auto_test:
        $(MAKE) test

 override_dh_installinit:
+       dh_installinit --no-start --no-restart-on-upgrade --name
cloud-init-local
        dh_installinit --no-start --no-restart-on-upgrade
+       dh_installinit --no-start --no-restart-on-upgrade --name cloud-config
+       dh_installinit --no-start --no-restart-on-upgrade --name cloud-final



More information about the Python-apps-team mailing list