public inbox for lvm2-cvs@sourceware.org
help / color / mirror / Atom feed
* LVM2/scripts cmirrord_init_red_hat.in
@ 2011-01-04 21:17 jbrassow
0 siblings, 0 replies; 2+ messages in thread
From: jbrassow @ 2011-01-04 21:17 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow@sourceware.org 2011-01-04 21:16:56
Modified files:
scripts : cmirrord_init_red_hat.in
Log message:
Fix bug 632681: cmirrord shouldn't fail 'start' if already started
Return 0 from the cmirrord init script if the daemon is already
running.
http://refspecs.freestandards.org/LSB_3.1.1/LSB-Core-generic/LSB-Core-generic/iniscrptact.html
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/cmirrord_init_red_hat.in.diff?cvsroot=lvm2&r1=1.4&r2=1.5
--- LVM2/scripts/cmirrord_init_red_hat.in 2010/01/22 16:19:38 1.4
+++ LVM2/scripts/cmirrord_init_red_hat.in 2011/01/04 21:16:54 1.5
@@ -21,6 +21,7 @@
start()
{
+ rtrn=0
if ! pidof $DAEMON > /dev/null
then
echo -n "Starting $DAEMON: "
^ permalink raw reply [flat|nested] 2+ messages in thread
* LVM2/scripts cmirrord_init_red_hat.in
@ 2010-01-15 21:48 jbrassow
0 siblings, 0 replies; 2+ messages in thread
From: jbrassow @ 2010-01-15 21:48 UTC (permalink / raw)
To: lvm-devel, lvm2-cvs
CVSROOT: /cvs/lvm2
Module name: LVM2
Changes by: jbrassow@sourceware.org 2010-01-15 21:48:04
Modified files:
scripts : cmirrord_init_red_hat.in
Log message:
Use tabs, not spaces.
Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/LVM2/scripts/cmirrord_init_red_hat.in.diff?cvsroot=lvm2&r1=1.1&r2=1.2
--- LVM2/scripts/cmirrord_init_red_hat.in 2010/01/15 20:47:52 1.1
+++ LVM2/scripts/cmirrord_init_red_hat.in 2010/01/15 21:48:03 1.2
@@ -19,42 +19,42 @@
start()
{
- echo -n "Starting clustered mirror log server:"
+ 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
+ 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:"
+ 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
+ if ! ps -C cmirrord >& /dev/null; then
+ break;
+ fi
+ sleep 1
done
if [ $i -ge 10 ]; then
- failure "shutdown"
- echo
- return 1
+ failure "shutdown"
+ echo
+ return 1
else
- success "shutdown"
+ success "shutdown"
fi
echo
- return $rtrn
+ return $rtrn
}
cmirror_status()
@@ -72,33 +72,33 @@
# 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}"
- ;;
+ 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:[~2011-01-04 21:17 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-04 21:17 LVM2/scripts cmirrord_init_red_hat.in jbrassow
-- strict thread matches above, loose matches on Subject: below --
2010-01-15 21:48 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).