From eca7ef180c516879777d614a155675e9d3dbf11e Mon Sep 17 00:00:00 2001 From: Milan Broz Date: Fri, 16 Mar 2007 17:15:36 +0000 Subject: [PATCH] Fix processing of exit status in init scripts --- WHATS_NEW | 1 + scripts/clvmd_init_rhel4 | 20 ++++---------------- scripts/lvm2_monitoring_init_rhel4 | 10 ++-------- 3 files changed, 7 insertions(+), 24 deletions(-) diff --git a/WHATS_NEW b/WHATS_NEW index 5ee9523d9..159960b8d 100644 --- a/WHATS_NEW +++ b/WHATS_NEW @@ -1,5 +1,6 @@ Version 2.02.24 - ==================================== + Fix processing of exit status in init scripts Fix vgremove to require at least one vg argument. Fix reading of striped LVs in LVM1 format. Flag nolocking as clustered so clvmd startup sees clustered LVs. (2.02.10) diff --git a/scripts/clvmd_init_rhel4 b/scripts/clvmd_init_rhel4 index 51730c22f..79eb36da3 100644 --- a/scripts/clvmd_init_rhel4 +++ b/scripts/clvmd_init_rhel4 @@ -43,16 +43,10 @@ start() then for vg in $LVM_VGS do - if ! action "Activating VG $vg:" $VGCHANGE -ayl $vg - then - rtrn=$? - fi + action "Activating VG $vg:" $VGCHANGE -ayl $vg || rtrn=$? done else - if ! action "Activating VGs:" $VGCHANGE -ayl - then - rtrn=$? - fi + action "Activating VGs:" $VGCHANGE -ayl || rtrn=$? fi done @@ -67,19 +61,13 @@ stop() then for vg in $LVM_VGS do - if ! action "Deactivating VG $vg:" $VGCHANGE -anl $vg - then - rtrn=$? - fi + action "Deactivating VG $vg:" $VGCHANGE -anl $vg || rtrn=$? done else # Hack to only deactivate clustered volumes clustervgs=`$VGDISPLAY 2> /dev/null | awk 'BEGIN {RS="VG Name"} {if (/Clustered/) print $1;}'` for vg in $clustervgs; do - if ! action "Deactivating VG $vg:" $VGCHANGE -anl $vg - then - rtrn=$? - fi + action "Deactivating VG $vg:" $VGCHANGE -anl $vg || rtrn=$? done fi diff --git a/scripts/lvm2_monitoring_init_rhel4 b/scripts/lvm2_monitoring_init_rhel4 index 3e84dfded..c9649569f 100644 --- a/scripts/lvm2_monitoring_init_rhel4 +++ b/scripts/lvm2_monitoring_init_rhel4 @@ -34,10 +34,7 @@ start() VGS=`vgs --noheadings -o name` for vg in $VGS do - if ! action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y $vg - then - ret=$? - fi + action "Starting monitoring for VG $vg:" $VGCHANGE --monitor y $vg || ret=$? done return $ret @@ -55,10 +52,7 @@ stop() VGS=`vgs --noheadings -o name` for vg in $VGS do - if ! action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n $vg - then - ret=$? - fi + action "Stopping monitoring for VG $vg:" $VGCHANGE --monitor n $vg || ret=$? done return $ret }