public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* STABLE2 - ip.sh: add sleeptime parameter
@ 2008-08-01 21:56 Ryan O'Hara
  0 siblings, 0 replies; only message in thread
From: Ryan O'Hara @ 2008-08-01 21:56 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=35d6cd1658c743c9e0419a4fd9acd54397558490
Commit:        35d6cd1658c743c9e0419a4fd9acd54397558490
Parent:        89ff10632d43b91a64f2b2612cd6186a370a7268
Author:        Ryan O'Hara <rohara@redhat.com>
AuthorDate:    Fri Aug 1 15:14:15 2008 -0500
Committer:     Ryan O'Hara <rohara@redhat.com>
CommitterDate: Fri Aug 1 16:54:54 2008 -0500

ip.sh: add sleeptime parameter

Allow user to specify amount of time to sleep after removing
and IP address ('stop' command). The sleeptime parameter is
specified in number of seconds. Default is 10 seconds.
Setting sleeptime to zero will result in no sleep.
---
 rgmanager/src/resources/ip.sh |   19 ++++++++++++++++++-
 1 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index e4c13d7..2e0ca03 100644
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -90,6 +90,17 @@ meta_data()
 	    <content type="boolean"/>
 	</parameter>
 
+	<parameter name="sleeptime">
+	    <longdesc lang="en">
+		Amount of time to sleep after removing an IP address.
+		Value is specified in seconds. Default value is 10.
+	    </longdesc>
+	    <shortdesc lang="en">
+		Amount of time (seconds) to sleep.
+	    </shortdesc>
+	    <content type="string"/>
+	</parameter>
+
     </parameters>
 
     <actions>
@@ -896,7 +907,13 @@ stop)
 
 		# XXX Let nfsd/lockd clear their queues; we hope to have a
 		# way to enforce this in the future
-		sleep 10
+		if [ -z "$OCF_RESKEY_sleeptime" ]; then
+		    sleep 10
+		else
+		    if [ "$OCF_RESKEY_sleeptime" -gt "0" ]; then
+			sleep $OCF_RESKEY_sleeptime
+		    fi
+		fi
 	else
 		ocf_log debug "${OCF_RESKEY_address} is not configured"
 	fi


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-08-01 21:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-08-01 21:56 STABLE2 - ip.sh: add sleeptime parameter Ryan O'Hara

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).