Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=00e... Commit: 00efed52b5c136d82aab67b86ef8188ec2678696 Parent: a8d2b47fe7aca0bd061e86fde33be2d28cdef956 Author: Jonathan Brassow jbrassow@redhat.com AuthorDate: Thu Dec 3 15:48:04 2009 -0600 Committer: Jonathan Brassow jbrassow@redhat.com CommitterDate: Thu Dec 3 15:49:19 2009 -0600
cmirror: Fix-up init script behaviour (bug 520915)
init script was throwing errors on 'stop' when it shouldn't have been. --- cmirror/init.d/cmirror | 16 +++++++++++++--- 1 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/cmirror/init.d/cmirror b/cmirror/init.d/cmirror index 170f004..5f1c243 100644 --- a/cmirror/init.d/cmirror +++ b/cmirror/init.d/cmirror @@ -55,7 +55,14 @@ stop() { echo -n "Stopping clustered mirror log server:" killall clogd >& /dev/null - if ps -C clogd >& /dev/null; then + for ((i=0; $i < 10; i++)); do + if ! ps -C clogd >& /dev/null; then + break; + fi + sleep 1 + done + + if [ $i -ge 10 ]; then failure "shutdown" echo return 1 @@ -65,8 +72,11 @@ stop()
echo echo -n "Unloading clustered mirror log module:" - rmmod dm-log-clustered - rtrn=$? + rtrn=0 + if lsmod | grep -w dm_log_clustered >& /dev/null; then + rmmod dm-log-clustered + rtrn=$? + fi
if [ $rtrn -eq 0 ]; then success "shutdown"
cluster-commits@lists.stg.fedorahosted.org