]> git.proxmox.com Git - corosync-pve.git/blame - patches/0003-remove-init-script.patch
bump version to 3.0.2-pve2
[corosync-pve.git] / patches / 0003-remove-init-script.patch
CommitLineData
e17b446b 1From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2a8fc658
FG
2From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com>
3Date: Wed, 8 Mar 2017 12:59:37 +0100
e17b446b 4Subject: [PATCH] remove init script
2a8fc658
FG
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
10---
d38948ac
FG
11 debian/corosync.init | 120 -------------------------------------------
12 1 file changed, 120 deletions(-)
2a8fc658
FG
13 delete mode 100644 debian/corosync.init
14
15diff --git a/debian/corosync.init b/debian/corosync.init
16deleted file mode 100644
d38948ac 17index ff5ee9f7..00000000
2a8fc658
FG
18--- a/debian/corosync.init
19+++ /dev/null
d38948ac 20@@ -1,120 +0,0 @@
2a8fc658
FG
21-#! /bin/sh
22-#
23-### BEGIN INIT INFO
24-# Provides: corosync
25-# Required-Start: $network $remote_fs $syslog
26-# Required-Stop: $network $remote_fs $syslog
27-# Default-Start: 2 3 4 5
28-# Default-Stop: 0 1 6
29-# Short-Description: corosync cluster framework
30-# Description: Manages the Corosync Cluster Engine.
31-### END INIT INFO
32-
33-# Author: Fabio M. Di Nitto <fabbione@ubuntu.com>
34-
35-# PATH should only include /usr/* if it runs after the mountnfs.sh script
36-PATH=/usr/sbin:/usr/bin:/sbin:/bin
37-DESC="corosync daemon"
38-NAME=corosync
39-DAEMON=/usr/sbin/$NAME
40-OPTIONS=""
41-PIDFILE=/var/run/$NAME.pid
42-SCRIPTNAME=/etc/init.d/$NAME
43-PIDFILE=/var/run/corosync.pid
44-RARUNDIR=/var/run/resource-agents
45-
46-# Exit if the package is not installed
47-[ -x "$DAEMON" ] || exit 0
48-
49-# Read configuration variable file if it is present
2a8fc658 50-[ -r /etc/default/corosync ] && . /etc/default/corosync
2a8fc658
FG
51-
52-# Make sure the Resource Agents run dir exists. Otherwise create it.
53-[ -d "$RARUNDIR" ] || mkdir -p $RARUNDIR
54-
55-# Define LSB log_* functions.
56-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
57-. /lib/lsb/init-functions
58-
59-#
60-# Function that starts the daemon/service
61-#
62-do_start()
63-{
64- # Return
65- # 0 if daemon has been started
66- # 1 if daemon was already running
67- # 2 if daemon could not be started
68- start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \
69- || return 1
70- start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS \
71- || return 2
72- # Add code here, if necessary, that waits for the process to be ready
73- # to handle requests from services started subsequently which depend
74- # on this one. As a last resort, sleep for some time.
75- pidof corosync > $PIDFILE
76-}
77-
78-#
79-# Function that stops the daemon/service
80-#
81-do_stop()
82-{
83- # Return
84- # 0 if daemon has been stopped
85- # 1 if daemon was already stopped
86- # 2 if daemon could not be stopped
87- # other if a failure occurred
88- start-stop-daemon --stop --quiet --retry forever/QUIT/1 --pidfile $PIDFILE
89- RETVAL="$?"
90- [ "$RETVAL" = 2 ] && return 2
91- # Many daemons don't delete their pidfiles when they exit.
92- rm -f $PIDFILE
93- return "$RETVAL"
94-}
95-
96-case "$1" in
97- start)
98- log_daemon_msg "Starting $DESC" "$NAME"
99- do_start
100- case "$?" in
101- 0|1) log_end_msg 0 ;;
102- 2) log_end_msg 1 ;;
103- esac
104- ;;
105- stop)
106- log_daemon_msg "Stopping $DESC" "$NAME"
107- do_stop
108- case "$?" in
109- 0|1) log_end_msg 0 ;;
110- 2) log_end_msg 1 ;;
111- esac
112- ;;
113- restart|force-reload)
114- log_daemon_msg "Restarting $DESC" "$NAME"
115- do_stop
116- case "$?" in
117- 0|1)
118- do_start
119- case "$?" in
120- 0) log_end_msg 0 ;;
121- 1) log_end_msg 1 ;; # Old process is still running
122- *) log_end_msg 1 ;; # Failed to start
123- esac
124- ;;
125- *)
126- # Failed to stop
127- log_end_msg 1
128- ;;
129- esac
130- ;;
131- status|monitor)
132- status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $?
133- ;;
134- *)
135- echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
136- exit 3
137- ;;
138-esac
139-
140-: