]> git.proxmox.com Git - corosync-pve.git/blob - patches/0008-remove-unecessary-and-problematic-corosync-qdevice.i.patch
rebase and re-format patches
[corosync-pve.git] / patches / 0008-remove-unecessary-and-problematic-corosync-qdevice.i.patch
1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Thomas Lamprecht <t.lamprecht@proxmox.com>
3 Date: Wed, 29 Mar 2017 09:35:19 +0200
4 Subject: [PATCH] remove unecessary and problematic corosync-qdevice.init
5
6 Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
7 ---
8 debian/corosync-qdevice.init | 55 ------------------------------------
9 1 file changed, 55 deletions(-)
10 delete mode 100755 debian/corosync-qdevice.init
11
12 diff --git a/debian/corosync-qdevice.init b/debian/corosync-qdevice.init
13 deleted file mode 100755
14 index 344666ad..00000000
15 --- a/debian/corosync-qdevice.init
16 +++ /dev/null
17 @@ -1,55 +0,0 @@
18 -#!/bin/sh
19 -# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing.
20 -if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then
21 - set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script
22 -fi
23 -### BEGIN INIT INFO
24 -# Provides: corosync-qdevice
25 -# Required-Start: $remote_fs $syslog corosync
26 -# Required-Stop: $remote_fs $syslog corosync
27 -# Default-Start:
28 -# Default-Stop: 0 1 6
29 -# Short-Description: Corosync Qdevice daemon
30 -# Description: Starts and stops Corosync Qdevice daemon.
31 -### END INIT INFO
32 -
33 -NAME="corosync-qdevice"
34 -DESC="Corosync Qdevice daemon"
35 -DAEMON="/usr/sbin/$NAME"
36 -PIDFILE="/run/$NAME/$NAME.pid"
37 -
38 -CONFIG="/etc/default/$NAME"
39 -[ -f "$CONFIG" ] && . "$CONFIG"
40 -
41 -DAEMON_ARGS="$COROSYNC_QDEVICE_OPTIONS"
42 -
43 -do_start_prepare() {
44 - if grep -q nocluster /proc/cmdline; then
45 - log_failure_msg "not configured to run at boot"
46 - exit 1
47 - fi
48 -}
49 -
50 -# do_{start,stop}_cmd from init-d-script, but without the --name option.
51 -# corosync-qdevice is too long for a process name, it gets truncated,
52 -# which makes it incompatible with the --name option. See #843419.
53 -do_start_cmd() {
54 - start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
55 - $START_ARGS \
56 - --startas $DAEMON --exec $DAEMON --test > /dev/null \
57 - || return 1
58 - start-stop-daemon --start --quiet ${PIDFILE:+--pidfile ${PIDFILE}} \
59 - $START_ARGS \
60 - --startas $DAEMON --exec $DAEMON -- $DAEMON_ARGS \
61 - || return 2
62 -}
63 -do_stop_cmd() {
64 - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \
65 - $STOP_ARGS \
66 - ${PIDFILE:+--pidfile ${PIDFILE}} --exec $DAEMON
67 - RETVAL="$?"
68 - [ "$RETVAL" = 2 ] && return 2
69 - # Many daemons don't delete their pidfiles when they exit.
70 - rm -f $PIDFILE
71 - return $RETVAL
72 -}