]>
Commit | Line | Data |
---|---|---|
e17b446b | 1 | From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 |
2a8fc658 FG |
2 | From: =?UTF-8?q?Fabian=20Gr=C3=BCnbichler?= <f.gruenbichler@proxmox.com> |
3 | Date: Wed, 8 Mar 2017 12:59:37 +0100 | |
e17b446b | 4 | Subject: [PATCH] remove init script |
2a8fc658 FG |
5 | MIME-Version: 1.0 |
6 | Content-Type: text/plain; charset=UTF-8 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ||
9 | Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com> | |
10 | --- | |
e77cc04e | 11 | debian/corosync.init | 122 ------------------------------------------- |
2a8fc658 FG |
12 | 1 file changed, 122 deletions(-) |
13 | delete mode 100644 debian/corosync.init | |
14 | ||
15 | diff --git a/debian/corosync.init b/debian/corosync.init | |
16 | deleted file mode 100644 | |
e17b446b | 17 | index f7b813a5..00000000 |
2a8fc658 FG |
18 | --- a/debian/corosync.init |
19 | +++ /dev/null | |
20 | @@ -1,122 +0,0 @@ | |
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 | |
50 | -set -a | |
51 | -[ -r /etc/default/corosync ] && . /etc/default/corosync | |
52 | -set +a | |
53 | - | |
54 | -# Make sure the Resource Agents run dir exists. Otherwise create it. | |
55 | -[ -d "$RARUNDIR" ] || mkdir -p $RARUNDIR | |
56 | - | |
57 | -# Define LSB log_* functions. | |
58 | -# Depend on lsb-base (>= 3.0-6) to ensure that this file is present. | |
59 | -. /lib/lsb/init-functions | |
60 | - | |
61 | -# | |
62 | -# Function that starts the daemon/service | |
63 | -# | |
64 | -do_start() | |
65 | -{ | |
66 | - # Return | |
67 | - # 0 if daemon has been started | |
68 | - # 1 if daemon was already running | |
69 | - # 2 if daemon could not be started | |
70 | - start-stop-daemon --start --quiet --exec $DAEMON --test > /dev/null \ | |
71 | - || return 1 | |
72 | - start-stop-daemon --start --quiet --exec $DAEMON -- $OPTIONS \ | |
73 | - || return 2 | |
74 | - # Add code here, if necessary, that waits for the process to be ready | |
75 | - # to handle requests from services started subsequently which depend | |
76 | - # on this one. As a last resort, sleep for some time. | |
77 | - pidof corosync > $PIDFILE | |
78 | -} | |
79 | - | |
80 | -# | |
81 | -# Function that stops the daemon/service | |
82 | -# | |
83 | -do_stop() | |
84 | -{ | |
85 | - # Return | |
86 | - # 0 if daemon has been stopped | |
87 | - # 1 if daemon was already stopped | |
88 | - # 2 if daemon could not be stopped | |
89 | - # other if a failure occurred | |
90 | - start-stop-daemon --stop --quiet --retry forever/QUIT/1 --pidfile $PIDFILE | |
91 | - RETVAL="$?" | |
92 | - [ "$RETVAL" = 2 ] && return 2 | |
93 | - # Many daemons don't delete their pidfiles when they exit. | |
94 | - rm -f $PIDFILE | |
95 | - return "$RETVAL" | |
96 | -} | |
97 | - | |
98 | -case "$1" in | |
99 | - start) | |
100 | - log_daemon_msg "Starting $DESC" "$NAME" | |
101 | - do_start | |
102 | - case "$?" in | |
103 | - 0|1) log_end_msg 0 ;; | |
104 | - 2) log_end_msg 1 ;; | |
105 | - esac | |
106 | - ;; | |
107 | - stop) | |
108 | - log_daemon_msg "Stopping $DESC" "$NAME" | |
109 | - do_stop | |
110 | - case "$?" in | |
111 | - 0|1) log_end_msg 0 ;; | |
112 | - 2) log_end_msg 1 ;; | |
113 | - esac | |
114 | - ;; | |
115 | - restart|force-reload) | |
116 | - log_daemon_msg "Restarting $DESC" "$NAME" | |
117 | - do_stop | |
118 | - case "$?" in | |
119 | - 0|1) | |
120 | - do_start | |
121 | - case "$?" in | |
122 | - 0) log_end_msg 0 ;; | |
123 | - 1) log_end_msg 1 ;; # Old process is still running | |
124 | - *) log_end_msg 1 ;; # Failed to start | |
125 | - esac | |
126 | - ;; | |
127 | - *) | |
128 | - # Failed to stop | |
129 | - log_end_msg 1 | |
130 | - ;; | |
131 | - esac | |
132 | - ;; | |
133 | - status|monitor) | |
134 | - status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? | |
135 | - ;; | |
136 | - *) | |
137 | - echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2 | |
138 | - exit 3 | |
139 | - ;; | |
140 | -esac | |
141 | - | |
142 | -: |