--- LVM2.2.02.181/scripts/blk_availability_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200 +++ LVM2.2.02.181/scripts/blk_availability_init_red_hat.in 2018-09-07 20:43:11.884952342 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved. # @@ -29,7 +29,7 @@ # Short-Description: Availability of block devices ### END INIT INFO -. /etc/init.d/functions +. /etc/rc.d/init.d/functions script=blkdeactivate @@ -41,16 +41,20 @@ case "$1" in start) touch "$LOCK_FILE" + exit 0 ;; stop) - action "Stopping block device availability:" "$sbindir/$script" $options + run_cmd "Stopping block device availability:" "$sbindir/$script" $options rm -f "$LOCK_FILE" + exit 0 ;; status) + exit 0 ;; *) - echo $"Usage: $0 {start|stop|status}" + msg_usage "$0 {start|stop|status}" + exit 3 ;; esac --- LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in.orig 2018-08-02 08:18:51.000000000 +0200 +++ LVM2.2.02.181/scripts/lvm2_monitoring_init_red_hat.in 2018-09-07 21:12:38.944932161 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved. # @@ -60,7 +60,14 @@ VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` for vg in $VGSLIST do - action "Starting monitoring for VG $vg:" "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? + msg_starting "monitoring for VG $vg:"; busy + "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg + ret=$? + if [ $ret -ne 0 ]; then + fail + return $ret + fi + ok done return $ret @@ -78,7 +85,14 @@ VGSLIST=`$VGS --noheadings -o name --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' 2> /dev/null` for vg in $VGSLIST do - action "Stopping monitoring for VG $vg:" "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$? + msg_stopping "monitoring for VG $vg:"; busy + "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg + ret=$? + if [ $ret -ne 0 ]; then + fail + return $ret + fi + ok done return $ret } @@ -127,7 +141,7 @@ ;; *) - echo $"Usage: $0 {start|stop|restart|status|force-stop}" + msg_usage "$0 {start|stop|restart|status|force-stop}" ;; esac --- LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in.orig 2018-09-07 20:29:42.941628244 +0200 +++ LVM2.2.02.181/scripts/blk_availability_systemd_red_hat.service.in 2018-09-07 21:28:09.498254872 +0200 @@ -6,7 +6,7 @@ [Service] Type=oneshot -ExecStart=/usr/bin/true +ExecStart=/bin/true ExecStop=@SBINDIR@/blkdeactivate -u -l wholevg -m disablequeueing -r wait RemainAfterExit=yes --- LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in.orig 2019-09-23 21:36:48.727591492 +0200 +++ LVM2.2.02.186/scripts/lvm2_lvmpolld_init_red_hat.in 2019-09-23 21:39:51.961644240 +0200 @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/sh # # Copyright (C) 2015 Red Hat, Inc. All rights reserved. # @@ -33,7 +33,7 @@ # Also avoids unsolicited termination due to external factors. ### END INIT INFO -. /etc/init.d/functions +. /etc/rc.d/init.d/functions DAEMON=lvmpolld @@ -53,14 +53,15 @@ start() { ret=0 - action "Starting LVM poll daemon:" "$sbindir/$DAEMON" || ret=$? + run_cmd "Starting LVM poll daemon:" "$sbindir/$DAEMON" || ret=$? return $ret } stop() { ret=0 - action "Signaling LVM poll daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$? + msg_stopping "LVM poll daemon" + killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$? return "$ret" } @@ -80,9 +81,9 @@ stop rtrn=$? [ $rtrn = 0 ] && rm -f "$LOCK_FILE" ;; - restart) + restart|force-reload) if stop then start @@ -105,7 +107,7 @@ ;; *) - echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}" + msg_usage "$0 {start|stop|force-stop|restart|force-reload|condrestart|try-restart|status}" ;; esac