-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
---- LVM2.2.02.132.orig/scripts/blk_availability_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
-+++ LVM2.2.02.132/scripts/blk_availability_init_red_hat.in 2015-10-05 11:36:09.176042000 +0000
+diff -urNpa LVM2.2.03.23.orig/scripts/blk_availability_init_red_hat.in LVM2.2.03.23/scripts/blk_availability_init_red_hat.in
+--- LVM2.2.03.23.orig/scripts/blk_availability_init_red_hat.in 2023-12-03 19:57:35.810406101 +0100
++++ LVM2.2.03.23/scripts/blk_availability_init_red_hat.in 2023-12-03 19:57:44.066504078 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
- # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+ # Copyright (C) 2012-2017 Red Hat, Inc. All rights reserved.
#
-@@ -31,28 +31,26 @@
+@@ -31,26 +31,29 @@
. /etc/init.d/functions
--sbindir=@sbindir@
-script=blkdeactivate
--options="-u -l wholevg"
+DAEMON="blkdeactivate"
-+OPTIONS="-u -l wholevg"
++OPTIONS="-u -l wholevg -m disablequeueing"
- LOCK_FILE="/var/lock/subsys/blk-availability"
-
--
--rtrn=1
+-sbindir=@SBINDIR@
+-options="-u -l wholevg -m disablequeueing -r wait"
-
+-LOCK_FILE="@DEFAULT_LOCK_DIR@/subsys/blk-availability"
++LOCK_FILE="/var/lock/subsys/blk-availability"
+
case "$1" in
start)
- touch $LOCK_FILE
+ touch "$LOCK_FILE"
+ exit 0
;;
--
+
stop)
-- action "Stopping block device availability:" $sbindir/$script $options
-+ run_cmd "Stopping block device availability:" /sbin/$DAEMON $OPTIONS
- rm -f $LOCK_FILE
+- action "Stopping block device availability:" "$sbindir/$script" $options
++ run_cmd "Stopping block device availability:" "/sbin/$DAEMON" $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
-diff -ur LVM2.2.02.132.orig/scripts/clvmd_init_red_hat.in LVM2.2.02.132/scripts/clvmd_init_red_hat.in
---- LVM2.2.02.132.orig/scripts/clvmd_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
-+++ LVM2.2.02.132/scripts/clvmd_init_red_hat.in 2015-10-05 09:44:25.805042000 +0000
-@@ -61,9 +61,8 @@
- start()
- {
- if ! rh_status_q; then
-- echo -n "Starting $DAEMON: "
-+ msg_starting "$DAEMON"
- $DAEMON $CLVMDOPTS || return $?
-- echo
- fi
-
- # Refresh local cache.
-@@ -83,7 +82,7 @@
-
- ${lvm_vgscan} > /dev/null 2>&1
-
-- action "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
-+ run_cmd "Activating VG(s):" ${lvm_vgchange} -aay $LVM_VGS || return $?
-
- touch $LOCK_FILE
-
-@@ -108,27 +107,23 @@
-
- [ -z "$LVM_VGS" ] && LVM_VGS="$(clustered_vgs)"
- if [ -n "$LVM_VGS" ]; then
-- action "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
-+ run_cmd "Deactivating clustered VG(s):" ${lvm_vgchange} -anl $LVM_VGS || return $?
- fi
-
-- action "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
-+ run_cmd "Signaling $DAEMON to exit" kill -TERM $(pidofproc $DAEMON) || return $?
-
- # wait half second before we start the waiting loop or we will show
- # the loop more time than really necessary
- usleep 500000
-
- # clvmd could take some time to stop
-- rh_status_q && action "Waiting for $DAEMON to exit:" wait_for_finish
-+ rh_status_q && run_cmd "Waiting for $DAEMON to exit:" wait_for_finish
-
- if rh_status_q; then
-- echo -n "$DAEMON failed to exit"
-- failure
-- echo
-+ fail
- return 1
- else
-- echo -n "$DAEMON terminated"
-- success
-- echo
-+ ok
- fi
-
- rm -f $LOCK_FILE
-@@ -138,7 +133,7 @@
-
- reload() {
- rh_status_q || exit 7
-- action "Reloading $DAEMON configuration: " $DAEMON -R || return $?
-+ run_cmd "Reloading $DAEMON configuration: " $DAEMON -R || return $?
- }
-
- restart() {
-@@ -149,7 +144,7 @@
-
- # Try to get clvmd to restart itself. This will preserve
- # exclusive LV locks
-- action "Restarting $DAEMON: " $DAEMON -S
-+ run_cmd "Restarting $DAEMON: " $DAEMON -S
-
- # If that fails then do a normal stop & restart
- if [ $? != 0 ]; then
-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
---- LVM2.2.02.132.orig/scripts/lvm2_lvmetad_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
-+++ LVM2.2.02.132/scripts/lvm2_lvmetad_init_red_hat.in 2015-10-05 11:12:06.584042000 +0000
-@@ -1,4 +1,4 @@
--#!/bin/bash
-+#!/bin/sh
+diff -urNpa LVM2.2.03.23.orig/scripts/cmirrord_init_red_hat.in LVM2.2.03.23/scripts/cmirrord_init_red_hat.in
+--- LVM2.2.03.23.orig/scripts/cmirrord_init_red_hat.in 2023-12-03 19:57:35.811406112 +0100
++++ LVM2.2.03.23/scripts/cmirrord_init_red_hat.in 2023-12-03 19:57:44.066504078 +0100
+@@ -2,7 +2,7 @@
+ #
+ # chkconfig: - 22 78
+ # description: Starts and stops cmirrord
+-# pidfile: @CMIRRORD_PIDFILE@
++# pidfile: /var/run/cmirrord.pid
#
- # Copyright (C) 2012 Red Hat, Inc. All rights reserved.
+ # For Red-Hat-based distributions such as Fedora, RHEL, CentOS.
#
-@@ -33,80 +33,76 @@
+@@ -16,95 +16,57 @@
. /etc/init.d/functions
--DAEMON=lvmetad
--
--exec_prefix=@exec_prefix@
--sbindir=@sbindir@
-+DAEMON="lvmetad"
-+NAME="LVM metadata daemon"
-
- LOCK_FILE="/var/lock/subsys/$DAEMON"
- PID_FILE="@LVMETAD_PIDFILE@"
-
--rh_status() {
-- status -p $PID_FILE $DAEMON
-+start() {
-+ if [ -f $LOCK_FILE ]; then
-+ msg_already_running $NAME
-+ return
-+ fi
-+ msg_starting $NAME
-+ daemon /sbin/$DAEMON </dev/null
-+ RETVAL=$?
-+ [ $RETVAL -eq 0 ] && touch $LOCK_FILE
- }
-
--rh_status_q() {
-- rh_status >/dev/null 2>&1
-+stop() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ return
-+ fi
-+ msg_stopping $NAME
-+ killproc --pidfile $PID_FILE $DAEMON
-+ rm -f $LOCK_FILE
- }
+-DAEMON=cmirrord
++DAEMON="cmirrord"
--start()
--{
-- ret=0
-- action "Starting LVM metadata daemon:" $DAEMON || ret=$?
-- return $ret
-+condrestart() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ RETVAL=$1
-+ return
-+ fi
-+ stop
-+ start
- }
+-usrsbindir="@USRSBINDIR@"
+-
+-LOCK_FILE="@DEFAULT_SYS_LOCK_DIR@/subsys/$DAEMON"
++LOCK_FILE="/var/lock/subsys/$DAEMON"
+ start()
+ {
+- rtrn=0
+- if ! pidof "$DAEMON" > /dev/null
+- then
+- echo -n "Starting $DAEMON: "
+- daemon "$usrsbindir/$DAEMON"
+- rtrn=$?
+- echo
+- fi
-
--stop()
--{
-- ret=0
-- action "Signaling LVM metadata daemon to exit:" killproc -p $PID_FILE $DAEMON -TERM || ret=$?
-- return $ret
-+reload() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ RETVAL=7
+- return $rtrn
++ if [ -f $LOCK_FILE ]; then
++ msg_already_running "$DAEMON"
+ return
+ fi
-+ msg_reloading $NAME
-+ killproc $DAEMON -HUP
++ msg_starting "$DAEMON"
++ daemon /sbin/$DAEMON </dev/null
+ RETVAL=$?
++ [ $RETVAL -eq 0 ] && touch "$LOCK_FILE"
}
--rtrn=1
--
-+RETVAL=0
- # See how we were called.
- case "$1" in
- start)
-- rh_status_q && exit 0
- start
+ stop()
+ {
+- echo -n "Stopping $DAEMON:"
+- killproc "$DAEMON" -TERM
- rtrn=$?
-- [ $rtrn = 0 ] && touch $LOCK_FILE
- ;;
+- echo
-
-- stop|force-stop)
-- rh_status_q || exit 0
-+ stop)
- stop
-- rtrn=$?
-- [ $rtrn = 0 ] && rm -f $LOCK_FILE
- ;;
+- return $rtrn
+-}
-
- restart)
-- if stop
-- then
-- start
-- fi
-- rtrn=$?
-+ stop
-+ start
- ;;
+-wait_for_finish()
+-{
+- count=0
-
- condrestart|try-restart)
-- rh_status_q || exit 0
-- if stop
+- while [ "$count" -le 10 -a -n "`pidof $DAEMON`" ]
+- do
+- sleep 1
+- count=$((count + 1))
+- done
+-
+- if [ "$(pidof "$DAEMON")" ]
- then
-- start
-- fi
-- rtrn=$?
-+ condrestart 0
- ;;
+- return 1
+- else
+- return 0
++ if [ ! -f $LOCK_FILE ]; then
++ msg_not_running "$DAEMON"
++ return
+ fi
++ msg_stopping "$DAEMON"
++ killproc --pidfile "$PID_FILE" "$DAEMON"
++ rm -f "$LOCK_FILE"
+ }
+
+-cmirror_status()
+-{
+- status "$DAEMON"
+-}
-
- status)
-- rh_status
-- rtrn=$?
-+ status $DAEMON
-+ exit $?
- ;;
+-rtrn=1
-
- *)
-- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
-+ msg_usage "$0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
- ;;
++RETVAL=0
+ # See how we were called.
+ case "$1" in
+ start)
+ start
+- rtrn=$?
+- [ "$rtrn" = 0 ] && touch "$LOCK_FILE"
+ ;;
+
+ stop)
+ stop
+- rtrn=$?
+- [ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
+ ;;
+
+ restart)
+- if stop
+- then
+- wait_for_finish
+- start
+- fi
+- rtrn=$?
++ stop
++ start
+ ;;
+
+ status)
+- cmirror_status
+- rtrn=$?
+- if [ "$rtrn" -eq 0 ]; then
+- echo "cmirror is running."
+- fi
++ status $DAEMON
++ exit $?
+ ;;
+
+ *)
+- echo $"Usage: $0 {start|stop|restart|status}"
++ msg_usage "$0 {start|stop|restart|status}"
+ ;;
esac
--
+
-exit $rtrn
+exit $RETVAL
-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
---- LVM2.2.02.132.orig/scripts/lvm2_lvmpolld_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
-+++ LVM2.2.02.132/scripts/lvm2_lvmpolld_init_red_hat.in 2015-10-05 11:11:58.892042000 +0000
+diff -urNpa LVM2.2.03.23.orig/scripts/lvm2_lvmpolld_init_red_hat.in LVM2.2.03.23/scripts/lvm2_lvmpolld_init_red_hat.in
+--- LVM2.2.03.23.orig/scripts/lvm2_lvmpolld_init_red_hat.in 2023-12-03 19:57:35.811406112 +0100
++++ LVM2.2.03.23/scripts/lvm2_lvmpolld_init_red_hat.in 2023-12-03 19:57:44.067504090 +0100
@@ -1,6 +1,6 @@
-#!/bin/bash
+#!/bin/sh
#
# This copyrighted material is made available to anyone wishing to use,
# modify, copy, or redistribute it subject to the terms and conditions
-@@ -27,88 +27,84 @@
+@@ -27,86 +27,92 @@
# Default-Start: 1 2 3 4 5
# Default-Stop: 0 6
# Short-Description: A daemon that is responsible for monitoring in-progress
-# and possibly longer term operations on logical volumes.
-# It helps to reduce the number of spawned processes if same
-+# and possibly longer term operations on logical volumes.
++# and possibly longer term operations on logical volumes.
+# It helps to reduce the number of spawned processes if same
# logical volume is requested to get monitored multiple times.
# Also avoids unsolicited termination due to external factors.
. /etc/init.d/functions
-DAEMON=lvmpolld
--
--exec_prefix=@exec_prefix@
--sbindir=@sbindir@
+DAEMON="lvmpolld"
+NAME="LVM poll daemon"
- LOCK_FILE="/var/lock/subsys/$DAEMON"
- PID_FILE="@LVMPOLLD_PIDFILE@"
-
+-sbindir="@SBINDIR@"
+-
+-LOCK_FILE="@DEFAULT_LOCK_DIR@/subsys/$DAEMON"
+-PID_FILE="@LVMPOLLD_PIDFILE@"
+-
-rh_status() {
-- status -p $PID_FILE $DAEMON
-+start() {
-+ if [ -f $LOCK_FILE ]; then
-+ msg_already_running $NAME
-+ return
-+ fi
-+ msg_starting $NAME
-+ daemon /sbin/$DAEMON </dev/null
-+ RETVAL=$?
-+ [ $RETVAL -eq 0 ] && touch $LOCK_FILE
- }
-
+- status -p "$PID_FILE" "$DAEMON"
+-}
+-
-rh_status_q() {
- rh_status >/dev/null 2>&1
-+stop() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ return
-+ fi
-+ msg_stopping $NAME
-+ killproc --pidfile $PID_FILE $DAEMON
-+ rm -f $LOCK_FILE
- }
+-}
++LOCK_FILE="/var/lock/subsys/lvm2-lvmpolld"
++PID_FILE="/var/run/lvmpolld.pid"
--start()
--{
+ start()
+ {
- ret=0
-- action "Starting LVM poll daemon:" $DAEMON || ret=$?
+- action "Starting LVM poll daemon:" "$sbindir/$DAEMON" || ret=$?
- return $ret
-+condrestart() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ RETVAL=$1
-+ return
-+ fi
-+ stop
-+ start
++ if [ -f $LOCK_FILE ]; then
++ msg_already_running "$NAME"
++ return
++ fi
++ msg_starting "$NAME"
++ daemon "/sbin/$DAEMON" </dev/null
++ RETVAL=$?
++ [ "$RETVAL" -eq 0 ] && touch "$LOCK_FILE"
}
--
--stop()
--{
+ stop()
+ {
- ret=0
-- action "Signaling LVM poll daemon to exit:" killproc -p $PID_FILE $DAEMON -TERM || ret=$?
-- return $ret
-+reload() {
-+ if [ ! -f $LOCK_FILE ]; then
-+ msg_not_running $NAME
-+ RETVAL=7
-+ return
-+ fi
-+ msg_reloading $NAME
-+ killproc $DAEMON -HUP
-+ RETVAL=$?
+- action "Signaling LVM poll daemon to exit:" killproc -p "$PID_FILE" "$DAEMON" -TERM || ret=$?
+- return "$ret"
++ if [ ! -f "$LOCK_FILE" ]; then
++ msg_not_running "$NAME"
++ return
++ fi
++ msg_stopping "$NAME"
++ killproc --pidfile "$PID_FILE" "$DAEMON"
++ rm -f "$LOCK_FILE"
++}
++
++condrestart() {
++ if [ ! -f "$LOCK_FILE" ]; then
++ msg_not_running "$NAME"
++ RETVAL=$1
++ return
++ fi
++ stop
++ start
}
-rtrn=1
--
++reload() {
++ if [ ! -f "$LOCK_FILE" ]; then
++ msg_not_running "$NAME"
++ RETVAL=7
++ return
++ fi
++ msg_reloading "$NAME"
++ killproc "$DAEMON" -HUP
++ RETVAL=$?
++}
+
+RETVAL=0
# See how we were called.
case "$1" in
- rh_status_q && exit 0
start
- rtrn=$?
-- [ $rtrn = 0 ] && touch $LOCK_FILE
+- [ $rtrn = 0 ] && touch "$LOCK_FILE"
;;
--
+
- stop|force-stop)
- rh_status_q || exit 0
+ stop)
stop
- rtrn=$?
-- [ $rtrn = 0 ] && rm -f $LOCK_FILE
+- [ $rtrn = 0 ] && rm -f "$LOCK_FILE"
;;
--
+
restart)
- if stop
- then
+ stop
+ start
;;
--
+
condrestart|try-restart)
- rh_status_q || exit 0
- if stop
- rtrn=$?
+ condrestart 0
;;
--
+
status)
- rh_status
- rtrn=$?
+ status $DAEMON
+ exit $?
;;
--
+
*)
- echo $"Usage: $0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
+ msg_usage "$0 {start|stop|force-stop|restart|condrestart|try-restart|status}"
;;
esac
--
+
-exit $rtrn
+exit $RETVAL
-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
---- LVM2.2.02.132.orig/scripts/lvm2_monitoring_init_red_hat.in 2015-09-22 15:00:59.000000000 +0000
-+++ LVM2.2.02.132/scripts/lvm2_monitoring_init_red_hat.in 2015-10-05 11:33:13.048042000 +0000
+diff -urNpa LVM2.2.03.23.orig/scripts/lvm2_monitoring_init_red_hat.in LVM2.2.03.23/scripts/lvm2_monitoring_init_red_hat.in
+--- LVM2.2.03.23.orig/scripts/lvm2_monitoring_init_red_hat.in 2023-12-03 19:57:35.811406112 +0100
++++ LVM2.2.03.23/scripts/lvm2_monitoring_init_red_hat.in 2023-12-03 19:57:44.067504090 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
#
# Copyright (C) 2007-2009 Red Hat, Inc. All rights reserved.
#
-@@ -31,15 +31,12 @@
+@@ -31,104 +31,92 @@
. /etc/init.d/functions
+DAEMON="lvm2-monitor"
+DMEVENTD_DAEMON="dmeventd"
--exec_prefix=@exec_prefix@
--sbindir=@sbindir@
--
--VGCHANGE=${sbindir}/vgchange
--VGS=${sbindir}/vgs
--LVS=${sbindir}/lvs
+-sbindir=@SBINDIR@
+VGCHANGE="/sbin/vgchange"
+VGS="/sbin/vgs"
+LVS="/sbin/lvs"
- LOCK_FILE="/var/lock/subsys/$DAEMON"
- PID_FILE="@DMEVENTD_PIDFILE@"
-@@ -47,89 +44,69 @@
+-VGCHANGE="$sbindir/vgchange"
+-VGS="$sbindir/vgs"
+-LVS="$sbindir/lvs"
+-
+-LOCK_FILE="@DEFAULT_SYS_LOCK_DIR@/subsys/$DAEMON"
+-PID_FILE="@DMEVENTD_PIDFILE@"
++LOCK_FILE="/var/lock/subsys/$DAEMON"
++PID_FILE="/var/run/dmeventd.pid"
+
WARN=1
export LVM_SUPPRESS_LOCKING_FAILURE_MESSAGES=1
-rh_status() {
-- status -p $PID_FILE $DMEVENTD_DAEMON
+- status -p "$PID_FILE" "$DMEVENTD_DAEMON"
-}
-
-rh_status_q() {
+ VGSLIST=`eval $VGS --noheadings -o name --ignoreskippedcluster --config $config 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=$?
-+ run_cmd "Starting monitoring for LVM VG $vg" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config $config $vg
+- action "Starting monitoring for VG $vg:" "$VGCHANGE" --monitor y --poll y --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
++ run_cmd "Starting monitoring for LVM VG $vg" $VGCHANGE --monitor y --poll y --ignoreskippedcluster --config $config $vg
done
-
- return $ret
+ VGSLIST=`eval $VGS --noheadings -o name --ignoreskippedcluster --config ${config} 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=$?
-+ run_cmd "Stopping monitoring for LVM VG $vg" $VGCHANGE --monitor n --ignoreskippedcluster --config $config $vg
+- action "Stopping monitoring for VG $vg:" "$VGCHANGE" --monitor n --ignoreskippedcluster --config 'log{command_names=0 prefix=" "}' $vg || ret=$?
++ run_cmd "Stopping monitoring for LVM VG $vg" $VGCHANGE --monitor n --ignoreskippedcluster --config $config $vg
done
- return $ret
}
case "$1" in
start)
- rh_status_q && exit 0
-+ status $DMEVENTD_DAEMON || exit 0
++ status "$DMEVENTD_DAEMON" 1>/dev/null 2>&1 && exit 0
start
- rtrn=$?
-- [ $rtrn = 0 ] && touch $LOCK_FILE
+- [ "$rtrn" = 0 ] && touch "$LOCK_FILE"
+ RETVAL=$?
-+ [ $RETVAL = 0 ] && touch $LOCK_FILE
++ [ "$RETVAL" = 0 ] && touch "$LOCK_FILE"
;;
--
+
force-stop)
- rh_status_q || exit 0
-+ status $DMEVENTD_DAEMON || exit 0
++ status "$DMEVENTD_DAEMON" 1>/dev/null 2>&1 || exit 0
WARN=0
stop
- rtrn=$?
-- [ $rtrn = 0 ] && rm -f $LOCK_FILE
+- [ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
+ RETVAL=$?
-+ [ $RETVAL = 0 ] && rm -f $LOCK_FILE
++ [ "$RETVAL" = 0 ] && rm -f "$LOCK_FILE"
;;
--
+
stop)
- rh_status_q || exit 0
-+ status $DMEVENTD_DAEMON || exit 0
++ status "$DMEVENTD_DAEMON" 1>/dev/null 2>&1 || exit 0
test "$runlevel" = "0" && WARN=0
test "$runlevel" = "6" && WARN=0
stop
- rtrn=$?
-- [ $rtrn = 0 ] && rm -f $LOCK_FILE
+- [ "$rtrn" = 0 ] && rm -f "$LOCK_FILE"
+ RETVAL=$?
-+ [ $RETVAL = 0 ] && rm -f $LOCK_FILE
++ [ "$RETVAL" = 0 ] && rm -f "$LOCK_FILE"
;;
--
+
restart)
WARN=0
- if stop
- fi
- rtrn=$?
+ stop
++ RETVAL=$?
++ [ "$RETVAL" = 0 ] && rm -f "$LOCK_FILE"
+ start
++ RETVAL=$?
++ [ "$RETVAL" = 0 ] && touch "$LOCK_FILE"
;;
--
+
status)
- rh_status
- rtrn=$?
-- [ $rtrn = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
-+ status $DMEVENTD_DAEMON
+- [ "$rtrn" = 0 ] && "$LVS" -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
++ status "$DMEVENTD_DAEMON"
+ RETVAL=$?
-+ [ $RETVAL = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
++ [ "$RETVAL" = 0 ] && $LVS -S 'seg_monitor=monitored' -o lv_full_name,seg_monitor
;;
--
+
*)
- echo $"Usage: $0 {start|stop|restart|status|force-stop}"
+ msg_usage "$0 {start|stop|restart|status|force-stop}"
;;
esac
--
+
-exit $rtrn
+exit $RETVAL