]> git.pld-linux.org Git - packages/lvm2.git/blame - lvm2-pld_init.patch
- updated to 2.02.106
[packages/lvm2.git] / lvm2-pld_init.patch
CommitLineData
4cb4934b
JK
1diff -dur LVM2.2.02.98.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.98/scripts/blk_availability_init_red_hat.in
2--- LVM2.2.02.98.orig/scripts/blk_availability_init_red_hat.in 2012-10-15 16:24:58.000000000 +0200
3+++ LVM2.2.02.98/scripts/blk_availability_init_red_hat.in 2012-10-25 12:01:33.000000000 +0200
4@@ -1,4 +1,4 @@
5-#!/bin/bash
6+#!/bin/sh
7 #
8 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
9 #
10@@ -43,16 +43,20 @@
11 case "$1" in
12 start)
13 touch $LOCK_FILE
14+ exit 0
15 ;;
16
17 stop)
18- action "Stopping block device availability:" $sbindir/$script $options
19+ run_cmd "Stopping block device availability:" $sbindir/$script $options
20 rm -f $LOCK_FILE
21+ exit 0
22 ;;
23
24 status)
25+ exit 0
26 ;;
27 *)
28- echo $"Usage: $0 {start|stop|status}"
29+ msg_usage "$0 {start|stop|status}"
30+ exit 3
31 ;;
32 esac
33diff -dur LVM2.2.02.98.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.98/scripts/clvmd_init_red_hat.in
34--- LVM2.2.02.98.orig/scripts/clvmd_init_red_hat.in 2012-10-15 16:24:58.000000000 +0200
35+++ LVM2.2.02.98/scripts/clvmd_init_red_hat.in 2012-10-25 11:57:52.000000000 +0200
36@@ -65,9 +65,8 @@
37 start()
38 {
39 if ! rh_status_q; then
40- echo -n "Starting $DAEMON: "
41+ msg_starting "$DAEMON"
42 $DAEMON $CLVMDOPTS || return $?
43- echo
44 fi
45
46 # Refresh local cache.
47@@ -87,7 +86,7 @@
48
49 ${lvm_vgscan} > /dev/null 2>&1
50
51- action "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
52+ run_cmd "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
53
54 touch $LOCK_FILE
55
56@@ -112,27 +111,23 @@
57
58 [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
59 if [ -n "$LVM_VGS" ]; then
60- action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
61+ run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
62 fi
63
64- action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
65+ run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
66
67 # wait half second before we start the waiting loop or we will show
68 # the loop more time than really necessary
69 usleep 500000
70
71 # clvmd could take some time to stop
72- rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
73+ rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
74
75 if rh_status_q; then
76- echo -n "$DAEMON failed to exit"
77- failure
78- echo
79+ fail
80 return 1
81 else
82- echo -n "$DAEMON terminated"
83- success
84- echo
85+ ok
86 fi
87
88 rm -f $LOCK_FILE
89@@ -142,7 +137,7 @@
90
91 reload() {
92 rh_status_q || exit 7
93- action "Reloading $DAEMON configuration: " $DAEMON -R || return $?
94+ run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $?
95 }
96
97 restart() {
98@@ -153,7 +148,7 @@
99
100 # Try to get clvmd to restart itself. This will preserve
101 # exclusive LV locks
102- action "Restarting $DAEMON: " $DAEMON -S
103+ run_cmd "Restarting $DAEMON: " $DAEMON -S
104
105 # If that fails then do a normal stop & restart
106 if [ $? != 0 ]; then
0442bdaf
JB
107--- LVM2.2.02.106/scripts/lvm2_monitoring_init_red_hat.in.orig 2014-04-10 17:38:46.000000000 +0200
108+++ LVM2.2.02.106/scripts/lvm2_monitoring_init_red_hat.in 2014-04-22 21:38:55.153260547 +0200
4cb4934b
JK
109@@ -1,4 +1,4 @@
110-#!/bin/bash
111+#!/bin/sh
112 #
113 # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
114 #
115@@ -46,12 +46,19 @@
116
117 start()
118 {
119- ret=0
120+ local ret=0
121 # TODO do we want to separate out already active groups only?
0442bdaf 122 VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
4cb4934b
JK
123 for vg in $VGSLIST
124 do
0442bdaf 125- action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
4cb4934b 126+ msg_starting "Starting monitoring for VG $vg:"; busy
0442bdaf
JB
127+ $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg
128+ ret=$?
129+ if [ $ret -ne 0 ]; then
130+ fail
131+ return $ret
132+ fi
133+ ok
4cb4934b
JK
134 done
135
136 return $ret
137@@ -60,7 +67,7 @@
138
139 stop()
140 {
141- ret=0
142+ local ret=0
143 # TODO do we want to separate out already active groups only?
144 if test "$WARN" = "1"; then
145 echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override."
146@@ -69,7 +76,14 @@
0442bdaf 147 VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
4cb4934b
JK
148 for vg in $VGSLIST
149 do
0442bdaf 150- action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
4cb4934b 151+ msg_stopping "Stopping monitoring for VG $vg:"; busy
0442bdaf
JB
152+ $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg
153+ ret=$?
154+ if [ $ret -ne 0 ]; then
155+ fail
156+ return $ret
157+ fi
158+ ok
4cb4934b
JK
159 done
160 return $ret
161 }
4bdf1a9f
JK
162diff -dur LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in
163--- LVM2.2.02.98.orig/scripts/blk_availability_systemd_red_hat.service.in 2012-10-15 16:24:58.000000000 +0200
164+++ LVM2.2.02.98/scripts/blk_availability_systemd_red_hat.service.in 2012-10-29 15:38:31.000000000 +0100
165@@ -6,7 +6,7 @@
166
167 [Service]
168 Type=oneshot
169-ExecStart=/usr/bin/true
170+ExecStart=/bin/true
171 ExecStop=@sbindir@/blkdeactivate -u -l wholevg
172 RemainAfterExit=yes
173
This page took 0.046673 seconds and 4 git commands to generate.