1 diff -ur LVM2.2.02.132.orig/scripts/blk_availability_init_red_hat.in LVM2.2.02.132/scripts/blk_availability_init_red_hat.in
2 --- LVM2.2.02.132.orig/scripts/blk_availability_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
3 +++ LVM2.2.02.132/scripts/blk_availability_init_red_hat.in 2015-10-05 11:36:09.176042000 +0000
8 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
12 . /etc/init.d/functions
16 -options="-u -l wholevg"
17 +DAEMON="blkdeactivate"
18 +OPTIONS="-u -l wholevg"
20 LOCK_FILE="/var/lock/subsys/blk-availability"
32 - action "Stopping block device availability:" $sbindir/$script $options
33 + run_cmd "Stopping block device availability:" /sbin/$DAEMON $OPTIONS
42 - echo $"Usage: $0 {start|stop|status}"
43 + msg_usage "$0 {start|stop|status}"
47 diff -ur LVM2.2.02.132.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.132/scripts/clvmd_init_red_hat.in
48 --- LVM2.2.02.132.orig/scripts/clvmd_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
49 +++ LVM2.2.02.132/scripts/clvmd_init_red_hat.in 2015-10-05 09:44:25.805042000 +0000
53 if ! rh_status_q; then
54 - echo -n "Starting $DAEMON: "
55 + msg_starting "$DAEMON"
56 $DAEMON $CLVMDOPTS || return $?
60 # Refresh local cache.
63 ${lvm_vgscan} > /dev/null 2>&1
65 - action "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
66 + run_cmd "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
72 [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
73 if [ -n "$LVM_VGS" ]; then
74 - action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
75 + run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
78 - action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
79 + run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
81 # wait half second before we start the waiting loop or we will show
82 # the loop more time than really necessary
85 # clvmd could take some time to stop
86 - rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
87 + rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
90 - echo -n "$DAEMON failed to exit"
96 - echo -n "$DAEMON terminated"
106 rh_status_q || exit 7
107 - action "Reloading $DAEMON configuration: " $DAEMON -R || return $?
108 + run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $?
114 # Try to get clvmd to restart itself. This will preserve
116 - action "Restarting $DAEMON: " $DAEMON -S
117 + run_cmd "Restarting $DAEMON: " $DAEMON -S
119 # If that fails then do a normal stop & restart
121 diff -ur LVM2.2.02.132.orig/scripts/lvm2_lvmetad_init_red_hat.in LVM2.2.02.132/scripts/lvm2_lvmetad_init_red_hat.in
122 --- LVM2.2.02.132.orig/scripts/lvm2_lvmetad_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
123 +++ LVM2.2.02.132/scripts/lvm2_lvmetad_init_red_hat.in 2015-10-05 11:12:06.584042000 +0000
128 # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
132 . /etc/init.d/functions
136 -exec_prefix=@exec_prefix@
139 +NAME="LVM metadata daemon"
141 LOCK_FILE="/var/lock/subsys/$DAEMON"
142 PID_FILE="@LVMETAD_PIDFILE@"
145 - status -p $PID_FILE $DAEMON
147 + if [ -f $LOCK_FILE ]; then
148 + msg_already_running $NAME
152 + daemon /sbin/$DAEMON </dev/null
154 + [ $RETVAL -eq 0 ] && touch $LOCK_FILE
158 - rh_status >/dev/null 2>&1
160 + if [ ! -f $LOCK_FILE ]; then
161 + msg_not_running $NAME
165 + killproc --pidfile $PID_FILE $DAEMON
172 - action "Starting LVM metadata daemon:" $DAEMON || ret=$?
175 + if [ ! -f $LOCK_FILE ]; then
176 + msg_not_running $NAME
188 - action "Signaling LVM metadata daemon to exit:" killproc -p $PID_FILE $DAEMON -TERM || ret=$?
191 + if [ ! -f $LOCK_FILE ]; then
192 + msg_not_running $NAME
196 + msg_reloading $NAME
197 + killproc $DAEMON -HUP
204 # See how we were called.
207 - rh_status_q && exit 0
210 - [ $rtrn = 0 ] && touch $LOCK_FILE
214 - rh_status_q || exit 0
218 - [ $rtrn = 0 ] && rm -f $LOCK_FILE
231 condrestart|try-restart)
232 - rh_status_q || exit 0
249 - echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
250 + msg_usage "$0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
256 diff -ur LVM2.2.02.132.orig/scripts/lvm2_lvmpolld_init_red_hat.in LVM2.2.02.132/scripts/lvm2_lvmpolld_init_red_hat.in
257 --- LVM2.2.02.132.orig/scripts/lvm2_lvmpolld_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
258 +++ LVM2.2.02.132/scripts/lvm2_lvmpolld_init_red_hat.in 2015-10-05 11:11:58.892042000 +0000
263 -# Copyright (C) 2015 Red Hat, Inc. All rights reserved.
264 +# Copyright (C) 2012 Red Hat, Inc. All rights reserved.
266 # This copyrighted material is made available to anyone wishing to use,
267 # modify, copy, or redistribute it subject to the terms and conditions
269 # Default-Start: 1 2 3 4 5
271 # Short-Description: A daemon that is responsible for monitoring in-progress
272 -# and possibly longer term operations on logical volumes.
273 -# It helps to reduce the number of spawned processes if same
274 +# and possibly longer term operations on logical volumes.
275 +# It helps to reduce the number of spawned processes if same
276 # logical volume is requested to get monitored multiple times.
277 # Also avoids unsolicited termination due to external factors.
280 . /etc/init.d/functions
284 -exec_prefix=@exec_prefix@
287 +NAME="LVM poll daemon"
289 LOCK_FILE="/var/lock/subsys/$DAEMON"
290 PID_FILE="@LVMPOLLD_PIDFILE@"
293 - status -p $PID_FILE $DAEMON
295 + if [ -f $LOCK_FILE ]; then
296 + msg_already_running $NAME
300 + daemon /sbin/$DAEMON </dev/null
302 + [ $RETVAL -eq 0 ] && touch $LOCK_FILE
306 - rh_status >/dev/null 2>&1
308 + if [ ! -f $LOCK_FILE ]; then
309 + msg_not_running $NAME
313 + killproc --pidfile $PID_FILE $DAEMON
320 - action "Starting LVM poll daemon:" $DAEMON || ret=$?
323 + if [ ! -f $LOCK_FILE ]; then
324 + msg_not_running $NAME
336 - action "Signaling LVM poll daemon to exit:" killproc -p $PID_FILE $DAEMON -TERM || ret=$?
339 + if [ ! -f $LOCK_FILE ]; then
340 + msg_not_running $NAME
344 + msg_reloading $NAME
345 + killproc $DAEMON -HUP
352 # See how we were called.
355 - rh_status_q && exit 0
358 - [ $rtrn = 0 ] && touch $LOCK_FILE
362 - rh_status_q || exit 0
366 - [ $rtrn = 0 ] && rm -f $LOCK_FILE
379 condrestart|try-restart)
380 - rh_status_q || exit 0
397 - echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
398 + msg_usage "$0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
404 diff -ur LVM2.2.02.132.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.02.132/scripts/lvm2_monitoring_init_red_hat.in
405 --- LVM2.2.02.132.orig/scripts/lvm2_monitoring_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
406 +++ LVM2.2.02.132/scripts/lvm2_monitoring_init_red_hat.in 2015-10-05 11:33:13.048042000 +0000
411 # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
415 . /etc/init.d/functions
418 -DMEVENTD_DAEMON=dmeventd
419 +DAEMON="lvm2-monitor"
420 +DMEVENTD_DAEMON="dmeventd"
422 -exec_prefix=@exec_prefix@
425 -VGCHANGE=${sbindir}/vgchange
428 +VGCHANGE="/sbin/vgchange"
432 LOCK_FILE="/var/lock/subsys/$DAEMON"
433 PID_FILE="@DMEVENTD_PIDFILE@"
436 export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
439 - status -p $PID_FILE $DMEVENTD_DAEMON
443 - rh_status >/dev/null 2>&1
448 + local config="'log{command_names=0 prefix=\" \"}'"
449 # TODO do we want to separate out already active groups only?
450 - VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
451 + VGSLIST=`eval $VGS --noheadings -o name --ignoreskippedcluster --config $config 2> /dev/null`
454 - action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
455 + run_cmd "Starting monitoring for LVM VG $vg" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config $config $vg
465 + local config="'log{command_names=0 prefix=\" \"}'"
466 # TODO do we want to separate out already active groups only?
467 if test "$WARN" = "1"; then
468 echo "Not stopping monitoring, this is a dangerous operation. Please use force-stop to override."
471 - VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null`
472 + VGSLIST=`eval $VGS --noheadings -o name --ignoreskippedcluster --config ${config} 2> /dev/null`
475 - action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
476 + run_cmd "Stopping monitoring for LVM VG $vg" $VGCHANGE --monitor n --ignoreskippedcluster --config $config $vg
484 # See how we were called.
487 - rh_status_q && exit 0
488 + status $DMEVENTD_DAEMON || exit 0
491 - [ $rtrn = 0 ] && touch $LOCK_FILE
493 + [ $RETVAL = 0 ] && touch $LOCK_FILE
497 - rh_status_q || exit 0
498 + status $DMEVENTD_DAEMON || exit 0
502 - [ $rtrn = 0 ] && rm -f $LOCK_FILE
504 + [ $RETVAL = 0 ] && rm -f $LOCK_FILE
508 - rh_status_q || exit 0
509 + status $DMEVENTD_DAEMON || exit 0
510 test "$runlevel" = "0" && WARN=0
511 test "$runlevel" = "6" && WARN=0
514 - [ $rtrn = 0 ] && rm -f $LOCK_FILE
516 + [ $RETVAL = 0 ] && rm -f $LOCK_FILE
533 - [ $rtrn = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
534 + status $DMEVENTD_DAEMON
536 + [ $RETVAL = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
540 - echo $"Usage: $0 {start|stop|restart|status|force-stop}"
541 + msg_usage "$0 {start|stop|restart|status|force-stop}"