public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2 ./WHATS_NEW scripts/cmirrord_init_red_hat.in
@ 2010-01-22 16:19 mbroz
0 siblings, 0 replies; 2+ messages in thread
From: mbroz @ 2010-01-22 16:19 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: mbroz@sourceware.org 2010-01-22 16:19:39
Modified files:
. : WHATS_NEW
scripts : cmirrord_init_red_hat.in
Log message:
Fix syntax error in cmirror init script
- break cannot be used here
- remove CLVMDOPTS
- add echo to stop call
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1404&r2=1.1405
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/cmirrord_init_red_hat.in.diff?cvsroot=lvm2&r1=1.3&r2=1.4
--- LVM2/WHATS_NEW 2010/01/22 15:40:31 1.1404
+++ LVM2/WHATS_NEW 2010/01/22 16:19:38 1.1405
@@ -1,5 +1,6 @@
Version 2.02.60
===================================
+ Fix syntax error in cmirror init script.
Eliminate extra ioctls just to check open_count in _add_new_lv_to_dtree.
Disable not thread-safe memory debugging if dmeventd is configured.
Fix first log message prefix in syslog for dmeventd plugins.
--- LVM2/scripts/cmirrord_init_red_hat.in 2010/01/19 02:04:35 1.3
+++ LVM2/scripts/cmirrord_init_red_hat.in 2010/01/22 16:19:38 1.4
@@ -24,14 +24,10 @@
if ! pidof $DAEMON > /dev/null
then
echo -n "Starting $DAEMON: "
- daemon $DAEMON $CLVMDOPTS
+ daemon $DAEMON
rtrn=$?
echo
- if [ $rtrn -ne 0 ]
- then
- break
- fi
- fi
+ fi
return $rtrn
}
@@ -41,6 +37,7 @@
echo -n "Stopping $DAEMON:"
killproc $DAEMON -TERM
rtrn=$?
+ echo
return $rtrn
}
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2 ./WHATS_NEW scripts/cmirrord_init_red_hat.in
@ 2010-01-15 20:47 jbrassow
0 siblings, 0 replies; 2+ messages in thread
From: jbrassow @ 2010-01-15 20:47 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow@sourceware.org 2010-01-15 20:47:52
Modified files:
. : WHATS_NEW
Added files:
scripts : cmirrord_init_red_hat.in
Log message:
Initial version of the cmirrord init script
Signed-off-by: Jonathan Brassow <jbrassow@redhat.com>
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/WHATS_NEW.diff?cvsroot=lvm2&r1=1.1393&r2=1.1394
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/cmirrord_init_red_hat.in.diff?cvsroot=lvm2&r1=NONE&r2=1.1
--- LVM2/WHATS_NEW 2010/01/15 20:24:04 1.1393
+++ LVM2/WHATS_NEW 2010/01/15 20:47:52 1.1394
@@ -1,5 +1,6 @@
Version 2.02.59 -
===================================
+ Initial version of the cmirror init script (Red Hat).
Initial version of the cmirrord man page.
Make cluster log communication structures architecture independant.
Fix cluster log issues with in-memory bitmaps.
/cvs/lvm2/LVM2/scripts/cmirrord_init_red_hat.in,v --> standard output
revision 1.1
--- LVM2/scripts/cmirrord_init_red_hat.in
+++ - 2010-01-15 20:47:53.109405000 +0000
@@ -0,0 +1,104 @@
+#!/bin/bash
+#
+# chkconfig: - 22 78
+# description: Loads/Unloads dm-log-clustered module
+#
+#
+### BEGIN INIT INFO
+# Provides: cmirrord
+# Required-Start: $network $time
+# Required-Stop: $network $time
+# Short-Description: Starts and stops cmirrord
+# Description: Starts and stops the cluster mirror log daemon
+### END INIT INFO
+
+. /etc/init.d/functions
+
+# set secure PATH
+PATH="/bin:/usr/bin:/sbin:/usr/sbin:/usr/sbin"
+
+start()
+{
+ echo -n "Starting clustered mirror log server:"
+ ps -C cmirrord >& /dev/null || cmirrord >& /dev/null
+
+ rtrn=$?
+ if [ $rtrn -eq 0 ]; then
+ success "startup"
+ else
+ failure "startup"
+ fi
+
+ # need the extra echo to properly terminate the line
+ echo
+ return $rtrn
+}
+
+stop()
+{
+ echo -n "Stopping clustered mirror log server:"
+ killall cmirrord >& /dev/null
+ for ((i=0; $i < 10; i++)); do
+ if ! ps -C cmirrord >& /dev/null; then
+ break;
+ fi
+ sleep 1
+ done
+
+ if [ $i -ge 10 ]; then
+ failure "shutdown"
+ echo
+ return 1
+ else
+ success "shutdown"
+ fi
+
+ echo
+ return $rtrn
+}
+
+cmirror_status()
+{
+ ps -C cmirrord >& /dev/null
+ if [ $? -ne 0 ]; then
+ echo "Cluster log server is not running. (Cluster mirrors will not work.)"
+ return 1
+ fi
+
+ return 0
+}
+
+rtrn=1
+
+# See how we were called.
+case "$1" in
+ start)
+ start
+ rtrn=$?
+ ;;
+
+ stop)
+ stop
+ rtrn=$?
+ ;;
+
+ restart)
+ $0 stop
+ $0 start
+ rtrn=$?
+ ;;
+
+ status)
+ cmirror_status
+ rtrn=$?
+ if [ $rtrn -eq 0 ]; then
+ echo "cmirror is running."
+ fi
+ ;;
+
+ *)
+ echo $"Usage: $0 {start|stop|restart|status}"
+ ;;
+esac
+
+exit $rtrn
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-01-22 16:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-01-22 16:19 LVM2 ./WHATS_NEW scripts/cmirrord_init_red_hat.in mbroz
-- strict thread matches above, loose matches on Subject: below --
2010-01-15 20:47 jbrassow
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).