]> git.proxmox.com Git - lvm.git/blob - patchdir/fix-clvm-init.patch
0b0e7fcf8ead9267f36c1227f265b6070f2e4c12
[lvm.git] / patchdir / fix-clvm-init.patch
1 Index: new/debian/clvm.defaults
2 ===================================================================
3 --- new.orig/debian/clvm.defaults 2013-03-03 12:46:47.000000000 +0100
4 +++ new/debian/clvm.defaults 2013-03-29 07:01:05.000000000 +0100
5 @@ -1,9 +1,11 @@
6 # Bourne shell compatible script, sourced by /etc/init.d/clvm to set
7 # additional arguments for clvmd.
8
9 +# enable clmvd
10 +#START_CLVM=yes
11 +
12 # Startup timeout:
13 -CLVMDTIMEOUT=20
14 +#CLVMDTIMEOUT=30
15
16 # Volume groups to activate on startup:
17 # LVM_VGS="cluster_vg1 cluster_vg2"
18 -
19 Index: new/debian/clvm.init
20 ===================================================================
21 --- new.orig/debian/clvm.init 2013-03-03 12:46:47.000000000 +0100
22 +++ new/debian/clvm.init 2013-03-29 07:09:13.000000000 +0100
23 @@ -2,12 +2,12 @@
24 #
25 ### BEGIN INIT INFO
26 # Provides: clvm
27 -# Required-Start: lvm2
28 -# Required-Stop: lvm2
29 +# Required-Start: lvm2 cman
30 +# Required-Stop: lvm2 cman
31 # Should-Start: cman corosync openais
32 # Should-Stop: cman corosync openais
33 -# Default-Start: S
34 -# Default-Stop: 0 6
35 +# Default-Start: 2 3 4 5
36 +# Default-Stop: 0 1 6
37 # Short-Description: start and stop the lvm cluster locking daemon
38 ### END INIT INFO
39 #
40 @@ -32,18 +32,21 @@
41 exit 0
42 fi
43
44 -if ! cman_tool status >/dev/null 2>&1; then
45 - log_failure_msg "clvmd: cluster is not running. Aborting."
46 - exit 0
47 -fi
48 -
49 -CLVMDTIMEOUT=20
50 +CLVMDTIMEOUT=30
51 +START_CLVM=no
52
53 # Read configuration variable file if it is present
54 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
55
56 +[ "$START_CLVM" = "yes" ] || exit 0
57 +
58 DAEMON_OPTS="-T$CLVMDTIMEOUT"
59
60 +if ! cman_tool status >/dev/null 2>&1; then
61 + log_failure_msg "clvmd: cluster is not running. Aborting."
62 + exit 1
63 +fi
64 +
65 do_start()
66 {
67 start-stop-daemon --start --quiet --exec $DAEMON -- $DAEMON_OPTS || status="$?"
68 Index: new/debian/rules
69 ===================================================================
70 --- new.orig/debian/rules 2013-03-29 06:58:07.000000000 +0100
71 +++ new/debian/rules 2013-03-29 07:12:46.000000000 +0100
72 @@ -77,7 +77,7 @@
73 $(CONFIGURE) \
74 --libdir=\$${exec_prefix}/lib/$(DEB_HOST_MULTIARCH) \
75 --with-optimisation="$(CFLAGS_OPT_DEB)" \
76 - --with-clvmd=cman,corosync,openais \
77 + --with-clvmd=cman,corosync \
78 --with-cluster=internal \
79 --with-device-uid=0 \
80 --with-device-gid=6 \
81 @@ -165,7 +165,7 @@
82 install_clvm: DIR = $(BUILD_DIR)/install_deb
83 install_clvm: $(STAMPS_DIR)/install_deb
84 +$(MAKE_SELF) install-base-prep INSTALL_DIR='$(DIR)'
85 - dh_installinit --no-start -- start 63 S . start 51 0 6 .
86 + dh_installinit --no-start -- start 63 2 3 4 5 . start 51 0 1 6 .
87 +$(MAKE_SELF) install-base
88
89 install_dmeventd: export DH_OPTIONS = -pdmeventd