]> git.proxmox.com Git - redhat-cluster-pve.git/blame - debian/patches/fix-cpglockd-init.diff
update to STABLE32 3.1.92
[redhat-cluster-pve.git] / debian / patches / fix-cpglockd-init.diff
CommitLineData
f3b46368
DM
1Index: new/rgmanager/init.d/cpglockd.in
2===================================================================
3--- new.orig/rgmanager/init.d/cpglockd.in 2012-06-13 16:17:08.000000000 +0200
4+++ new/rgmanager/init.d/cpglockd.in 2012-06-13 16:25:43.000000000 +0200
5@@ -6,10 +6,10 @@
6 #
7 ### BEGIN INIT INFO
8 # Provides: cpglockd
9-# Required-Start: cman
10-# Required-Stop: cman
11-# Default-Start:
12-# Default-Stop:
13+# Required-Start: $remote_fs cman
14+# Required-Stop: $remote_fs cman
15+# Default-Start: 2 3 4 5
16+# Default-Stop: 0 1 6
17 # Short-Description: Starts and stops the CPG lock daemon
18 # Description: Starts and stops the CPG lock daemon
19 ### END INIT INFO
20@@ -53,9 +53,7 @@
21
22 # deb based distros
23 if [ -d /etc/default ]; then
24- [ -f /etc/default/cluster ] && . /etc/default/cluster
25- [ -f /etc/default/rgmanager ] && . /etc/default/rgmanager
26- [ -f /etc/default/cpglockd ] && . /etc/default/cpglockd
27+ [ -f /etc/default/redhat-cluster-pve ] && . /etc/default/redhat-cluster-pve
28 [ -z "$LOCK_FILE" ] && LOCK_FILE="/var/lock/cpglockd"
29 fi
30
31@@ -70,6 +68,11 @@
32 kill -TERM $(pidof $CPGLOCKD)
33 }
34
35+rgmanager_enabled()
36+{
37+ ccs_tool query /cluster/rm >/dev/null 2>&1
38+}
39+
40 rtrn=0
41
42 if [ "$EUID" != "0" ]; then
43@@ -79,6 +82,11 @@
44
45 case "$1" in
46 start)
47+
48+ if ! rgmanager_enabled; then
49+ exit 0;
50+ fi
51+
52 echo -n "Starting $ID: "
53
54 # most recent distributions use tmpfs for /var/run