]> git.pld-linux.org Git - packages/lvm2.git/blame - lvm2-pld_init.patch
use upstream fixes for long systemd shutdown times
[packages/lvm2.git] / lvm2-pld_init.patch
CommitLineData
dab0ac18
JB
1--- LVM2.2.02.181/scripts/blk_availability_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200
2+++ LVM2.2.02.181/scripts/blk_availability_init_red_hat.in 2018-09-07 20:43:11.884952342 +0200
4cb4934b
JK
3@@ -1,4 +1,4 @@
4-#!/bin/bash
5+#!/bin/sh
6 #
dab0ac18 7 # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
4cb4934b 8 #
dab0ac18
JB
9@@ -29,7 +29,7 @@
10 # Short-Description: Availability of block devices
11 ### END INIT INFO
12
13-. /etc/init.d/functions
14+. /etc/rc.d/init.d/functions
15
16 script=blkdeactivate
17
18@@ -41,16 +41,20 @@
4cb4934b
JK
19 case "$1" in
20 start)
dab0ac18 21 touch "$LOCK_FILE"
4cb4934b
JK
22+ exit 0
23 ;;
24
25 stop)
dab0ac18
JB
26- action "Stopping block device availability:" "$sbindir/$script" $options
27+ run_cmd "Stopping block device availability:" "$sbindir/$script" $options
28 rm -f "$LOCK_FILE"
4cb4934b
JK
29+ exit 0
30 ;;
31
32 status)
33+ exit 0
34 ;;
35 *)
36- echo $"Usage: $0 {start|stop|status}"
37+ msg_usage "$0 {start|stop|status}"
38+ exit 3
39 ;;
40 esac
dab0ac18
JB
41--- LVM2.2.02.181/scripts/clvmd_init_red_hat.in.orig 2018-09-07 20:29:42.941628244 +0200
42+++ LVM2.2.02.181/scripts/clvmd_init_red_hat.in 2018-09-07 20:42:59.688285818 +0200
43@@ -1,4 +1,4 @@
44-#!/bin/bash
45+#!/bin/sh
46 #
47 # clvmd - Clustered LVM Daemon init script
48 #
49@@ -61,9 +61,8 @@
4cb4934b
JK
50 start()
51 {
52 if ! rh_status_q; then
53- echo -n "Starting $DAEMON: "
54+ msg_starting "$DAEMON"
dab0ac18 55 "$usrsbindir/$DAEMON" $CLVMDOPTS || return $?
4cb4934b
JK
56- echo
57 fi
58
59 # Refresh local cache.
dab0ac18 60@@ -83,7 +82,7 @@
4cb4934b 61
dab0ac18 62 "$lvm_vgscan" > /dev/null 2>&1
4cb4934b 63
dab0ac18
JB
64- action "Activating VG(s):" "$lvm_vgchange" -aay $LVM_VGS || return $?
65+ run_cmd "Activating VG(s):" "$lvm_vgchange" -aay $LVM_VGS || return $?
4cb4934b 66
dab0ac18 67 touch "$LOCK_FILE"
4cb4934b 68
dab0ac18 69@@ -108,27 +107,23 @@
4cb4934b
JK
70
71 [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
72 if [ -n "$LVM_VGS" ]; then
dab0ac18
JB
73- action "Deactivating clustered VG(s):" "$lvm_vgchange" -anl $LVM_VGS || return $?
74+ run_cmd "Deactivating clustered VG(s):" "$lvm_vgchange" -anl $LVM_VGS || return $?
4cb4934b
JK
75 fi
76
dab0ac18
JB
77- action "Signaling $DAEMON to exit" kill -TERM "$(pidofproc "$DAEMON")" || return $?
78+ run_cmd "Signaling $DAEMON to exit" kill -TERM "$(pidofproc "$DAEMON")" || return $?
4cb4934b
JK
79
80 # wait half second before we start the waiting loop or we will show
81 # the loop more time than really necessary
82 usleep 500000
83
84 # clvmd could take some time to stop
85- rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
86+ rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
87
88 if rh_status_q; then
89- echo -n "$DAEMON failed to exit"
90- failure
91- echo
92+ fail
93 return 1
94 else
95- echo -n "$DAEMON terminated"
96- success
97- echo
98+ ok
99 fi
100
dab0ac18
JB
101 rm -f "$LOCK_FILE"
102@@ -138,7 +133,7 @@
4cb4934b
JK
103
104 reload() {
105 rh_status_q || exit 7
dab0ac18
JB
106- action "Reloading $DAEMON configuration: " "$usrsbindir/$DAEMON" -R || return $?
107+ run_cmd "Reloading $DAEMON configuration: " "$usrsbindir/$DAEMON" -R || return $?
4cb4934b
JK
108 }
109
110 restart() {
dab0ac18 111@@ -149,7 +144,7 @@
4cb4934b
JK
112
113 # Try to get clvmd to restart itself. This will preserve
114 # exclusive LV locks
dab0ac18
JB
115- action "Restarting $DAEMON: " "$usrsbindir/$DAEMON" -S
116+ run_cmd "Restarting $DAEMON: " "$usrsbindir/$DAEMON" -S
4cb4934b
JK
117
118 # If that fails then do a normal stop & restart
119 if [ $? != 0 ]; then
dab0ac18
JB
120@@ -206,7 +201,7 @@
121 ;;
122
123 *)
124- echo $"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
125+ msg_usage "$0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
126 rtrn=2
127 ;;
128 esac
129--- LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200
130+++ LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in 2018-09-07 21:12:38.944932161 +0200
4cb4934b
JK
131@@ -1,4 +1,4 @@
132-#!/bin/bash
133+#!/bin/sh
134 #
135 # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
136 #
dab0ac18 137@@ -60,7 +60,14 @@
0442bdaf 138 VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
4cb4934b
JK
139 for vg in $VGSLIST
140 do
dab0ac18
JB
141- action "Starting monitoring for VG $vg:" "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
142+ msg_starting "monitoring for VG $vg:"; busy
143+ "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg
0442bdaf
JB
144+ ret=$?
145+ if [ $ret -ne 0 ]; then
146+ fail
147+ return $ret
148+ fi
149+ ok
4cb4934b
JK
150 done
151
152 return $ret
dab0ac18 153@@ -78,7 +85,14 @@
0442bdaf 154 VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
4cb4934b
JK
155 for vg in $VGSLIST
156 do
dab0ac18
JB
157- action "Stopping monitoring for VG $vg:" "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
158+ msg_stopping "monitoring for VG $vg:"; busy
159+ "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg
0442bdaf
JB
160+ ret=$?
161+ if [ $ret -ne 0 ]; then
162+ fail
163+ return $ret
164+ fi
165+ ok
4cb4934b
JK
166 done
167 return $ret
168 }
dab0ac18
JB
169@@ -127,7 +141,7 @@
170 ;;
171
172 *)
173- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
174+ msg_usage "$0 {start|stop|restart|status|force-stop}"
175 ;;
176 esac
177
178--- LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in.orig 2018-09-07 20:29:42.941628244 +0200
179+++ LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in 2018-09-07 21:28:09.498254872 +0200
4bdf1a9f
JK
180@@ -6,7 +6,7 @@
181
182 [Service]
183 Type=oneshot
184-ExecStart=/usr/bin/true
185+ExecStart=/bin/true
dab0ac18 186 ExecStop=@SBINDIR@/blkdeactivate -u -l wholevg -m disablequeueing -r wait
4bdf1a9f
JK
187 RemainAfterExit=yes
188
dab0ac18
JB
189--- LVM2.2.02.181/scripts/lvm2_lvmetad_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200
190+++ LVM2.2.02.181/scripts/lvm2_lvmetad_init_red_hat.in 2018-09-07 21:30:09.964920166 +0200
534322ac
JB
191@@ -1,4 +1,4 @@
192-#!/bin/bash
193+#!/bin/sh
194 #
dab0ac18 195 # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
534322ac 196 #
dab0ac18
JB
197@@ -31,7 +31,7 @@
198 # subsequent LVM commands or while using lvm2app library.
199 ### END INIT INFO
200
201-. /etc/init.d/functions
202+. /etc/rc.d/init.d/functions
203
204 DAEMON=lvmetad
205
206@@ -51,14 +51,15 @@
534322ac
JB
207 start()
208 {
209 ret=0
dab0ac18
JB
210- action "Starting LVM metadata daemon:" "$sbindir/$DAEMON" || ret=$?
211+ run_cmd "Starting LVM metadata daemon:" "$sbindir/$DAEMON" || ret=$?
534322ac
JB
212 return $ret
213 }
214
534322ac
JB
215 stop()
216 {
217 ret=0
dab0ac18 218- action "Signaling LVM metadata daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
534322ac 219+ msg_stopping "LVM metadata daemon"
dab0ac18 220+ killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
534322ac
JB
221 return $ret
222 }
223
dab0ac18 224@@ -78,9 +79,10 @@
534322ac
JB
225 stop
226 rtrn=$?
dab0ac18 227 [ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
534322ac
JB
228+ exit 0
229 ;;
230
231- restart)
232+ restart|force-reload)
233 if stop
234 then
235 start
dab0ac18 236@@ -103,7 +105,7 @@
534322ac
JB
237 ;;
238
239 *)
240- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
dab0ac18 241+ msg_usage "$0 {start|stop|force-stop|restart|force-reload|condrestart|try-restart|status}"
534322ac
JB
242 ;;
243 esac
244
This page took 0.068082 seconds and 4 git commands to generate.