Send Linux-ha-cvs mailing list submissions to
[email protected]
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
or, via email, send a message with subject or body 'help' to
[EMAIL PROTECTED]
You can reach the person managing the list at
[EMAIL PROTECTED]
When replying, please edit your Subject line so it is more specific
than "Re: Contents of Linux-ha-cvs digest..."
Today's Topics:
1. Linux-HA CVS: resources by xunsun from
([email protected])
----------------------------------------------------------------------
Message: 1
Date: Sun, 2 Apr 2006 08:35:29 -0600 (MDT)
From: [email protected]
Subject: [Linux-ha-cvs] Linux-HA CVS: resources by xunsun from
To: [EMAIL PROTECTED]
Message-ID: <[EMAIL PROTECTED]>
linux-ha CVS committal
Author : xunsun
Host :
Project : linux-ha
Module : resources
Dir : linux-ha/resources/heartbeat
Modified Files:
Delay.in
Log Message:
converted to OCF wrapper
===================================================================
RCS file: /home/cvs/linux-ha/linux-ha/resources/heartbeat/Delay.in,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- Delay.in 29 Aug 2005 02:08:28 -0000 1.4
+++ Delay.in 2 Apr 2006 14:35:29 -0000 1.5
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $Id: Delay.in,v 1.4 2005/08/29 02:08:28 sunjd Exp $
+# $Id: Delay.in,v 1.5 2006/04/02 14:35:29 xunsun Exp $
#
# License: GNU General Public License (GPL)
# Support: [EMAIL PROTECTED]
@@ -17,75 +17,27 @@
usage() {
cat <<-!
usage: $0 [delay [stopdelay]] {start|stop|status|monitor}";
- $Id: Delay.in,v 1.4 2005/08/29 02:08:28 sunjd Exp $
+ $Id: Delay.in,v 1.5 2006/04/02 14:35:29 xunsun Exp $
!
exit 1
}
-. @sysconfdir@/ha.d/shellfuncs
-
[EMAIL PROTECTED]@/run/@HB_PKG@
-VLFILE=$HA_VARRUNDIR/rsctmp/Delay
-
-Delay_stat() {
- test -f $VLFILE
-
-}
-
-Delay_Status() {
- if
- Delay_stat
- then
- echo "Delay is running OK"
- exit 0
- else
- echo "Delay is not operational"
- exit 1
- fi
-}
-
-Delay_Start() {
- if
- Delay_stat
- then
- echo "Delay already running"
- return 0
- else
- touch $VLFILE
- rc=$?
- sleep $StartDelay
- return $rc
- fi
-}
-
-Delay_Stop() {
- if
- Delay_stat
- then
- unlink $VLFILE
- rc=$?
- sleep $StopDelay
- return $rc
- else
- echo "Delay already stopped"
- return 0
- fi
-}
+. @HB_RA_DIR@/hto-mapfuncs
+startdelay=
+stopdelay=
case $# in
- 1) StartDelay=30; StopDelay=30; op=$1;;
- 2) StartDelay=$1; StopDelay=$1; op=$2;;
- 3) StartDelay=$1; StopDelay=$2; op=$3;;
- *) usage; exit 1;;
+ 1) op=$1;;
+ 2) startdelay=$1; op=$2;;
+ 3) startdelay=$1; stopdelay=$2; op=$3;;
+ *) usage;;
esac
case $op in
- start) Delay_Start;;
- stop) Delay_Stop;;
- status|monitor) Delay_Status;;
-
- *) usage
- exit 1;;
+ start|stop|status|monitor)
+ ;;
+ *)
+ usage;;
esac
-exit $?
+ra_execocf "rsc_id=Delay" "rsc_type=Delay" "provider=heartbeat" $op
"startdelay=$startdelay" "stopdelay=$stopdelay"
------------------------------
_______________________________________________
Linux-ha-cvs mailing list
[email protected]
http://lists.community.tummy.com/mailman/listinfo/linux-ha-cvs
End of Linux-ha-cvs Digest, Vol 29, Issue 1
*******************************************