cluster: RHEL55 - cmirror: Fix-up init script behaviour (bug 520915)
Jonathan Brassow
jbrassow at fedoraproject.org
Thu Dec 3 21:48:28 UTC 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6a5f12eea4e117b3ed50016e737fc4847ccbd634
Commit: 6a5f12eea4e117b3ed50016e737fc4847ccbd634
Parent: b68607cde920f70f38c595c35e91daf84802e1f3
Author: Jonathan Brassow <jbrassow at redhat.com>
AuthorDate: Thu Dec 3 15:48:04 2009 -0600
Committer: Jonathan Brassow <jbrassow at redhat.com>
CommitterDate: Thu Dec 3 15:48:04 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"
More information about the cluster-commits
mailing list