public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* RHEL5 - cmirror init script: Fix bug 460229 - add status output
@ 2008-08-27 19:49 Jonathan Brassow
0 siblings, 0 replies; only message in thread
From: Jonathan Brassow @ 2008-08-27 19:49 UTC (permalink / raw)
To: cluster-cvs-relay
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=29b4608b93abf8517b735c9c7065c96f8be1c529
Commit: 29b4608b93abf8517b735c9c7065c96f8be1c529
Parent: 397b8111d2d69b9dd25e7b074822be571f274032
Author: Jonathan Brassow <jbrassow@redhat.com>
AuthorDate: Wed Aug 27 14:25:50 2008 -0500
Committer: Jonathan Brassow <jbrassow@redhat.com>
CommitterDate: Wed Aug 27 14:26:47 2008 -0500
cmirror init script: Fix bug 460229 - add status output
Also noticed that the return code wasn't always correct
when doing 'service cmirror status'.
---
cmirror/init.d/cmirror | 23 ++++++++++++++++++++++-
1 files changed, 22 insertions(+), 1 deletions(-)
diff --git a/cmirror/init.d/cmirror b/cmirror/init.d/cmirror
index e8ba827..fba99e1 100644
--- a/cmirror/init.d/cmirror
+++ b/cmirror/init.d/cmirror
@@ -79,6 +79,23 @@ stop()
return $rtrn
}
+cmirror_status()
+{
+ ps -C clogd >& /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Cluster log server is not running. (Cluster mirrors will not work.)"
+ return 1
+ fi
+
+ modprobe dm-log-clustered
+ if [ $? -ne 0 ]; then
+ echo "Cluster log module is not loaded. (Cluster mirrors will not work.)"
+ return 1
+ fi
+
+ return 0
+}
+
rtrn=1
# See how we were called.
@@ -100,7 +117,11 @@ case "$1" in
;;
status)
- rtrn=1
+ cmirror_status
+ rtrn=$?
+ if [ $rtrn -eq 0 ]; then
+ echo "cmirror is running."
+ fi
;;
*)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-08-27 19:27 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-27 19:49 RHEL5 - cmirror init script: Fix bug 460229 - add status output Jonathan Brassow
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).