public inbox for cluster-cvs@sourceware.org
help / color / mirror / Atom feed
* resource-agents: master - rgmanager: Fix ip start phase with monitor_link="0"
@ 2009-03-12 15:10 Lon Hohberger
  0 siblings, 0 replies; only message in thread
From: Lon Hohberger @ 2009-03-12 15:10 UTC (permalink / raw)
  To: cluster-cvs-relay

Gitweb:        http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git;a=commitdiff;h=fbc8a98d6c8f79aea5a7fb39b5074e97b2ea5187
Commit:        fbc8a98d6c8f79aea5a7fb39b5074e97b2ea5187
Parent:        d7359cef226252fe3754fd4330111108a191920f
Author:        Lon Hohberger <lhh@redhat.com>
AuthorDate:    Mon Mar 9 11:40:40 2009 -0400
Committer:     Lon Hohberger <lhh@redhat.com>
CommitterDate: Thu Mar 12 11:09:30 2009 -0400

rgmanager: Fix ip start phase with monitor_link="0"

Signed-off-by: Lon Hohberger <lhh@redhat.com>
---
 rgmanager/src/resources/ip.sh |   35 ++++++++++++++++++-----------------
 1 files changed, 18 insertions(+), 17 deletions(-)

diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index 245dcf5..7a7d6c5 100644
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -615,10 +615,13 @@ ipv6()
                         if [ $? -ne 0 ]; then
                                 continue
                         fi
-                        network_link_up $dev
-                        if [ $? -ne 0 ]; then
-                                continue
-                        fi
+			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
+                        	network_link_up $dev
+                        	if [ $? -ne 0 ]; then
+                                	continue
+                        	fi
+			fi
+
 			if [ "${addr/\/*/}" = "${addr}" ]; then
 				addr="$addr/$maskbits"
 			fi
@@ -684,9 +687,11 @@ ipv4()
 			if [ $? -ne 0 ]; then
 			        continue
 			fi
-			network_link_up $dev
-			if [ $? -ne 0 ]; then
-				continue
+			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
+				network_link_up $dev
+				if [ $? -ne 0 ]; then
+					continue
+				fi
 			fi
 
 			if [ "${addr/\/*/}" = "${addr}" ]; then
@@ -802,15 +807,9 @@ ip_op()
 {
 	declare dev
 	declare rtr
-	declare monitor_link
 	declare addr=${3/\/*/}
 	
-	monitor_link="yes"
-	if [ "${OCF_RESKEY_monitor_link}" = "no" ] ||
-	    [ "${OCF_RESKEY_monitor_link}" = "0" ]; then
-	        monitor_link="no"
-	fi
-	
+
 	if [ "$2" = "status" ]; then
 
 		ocf_log debug "Checking $3, Level $OCF_CHECK_LEVEL"
@@ -822,7 +821,7 @@ ip_op()
 		fi
 		ocf_log debug "$3 present on $dev"
 		
-		if [ "$monitor_link" = "yes" ]; then
+		if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
 			if ! network_link_up $dev; then
 		        	ocf_log warn "No link on $dev..."
 				return 1
@@ -873,11 +872,13 @@ if [ -z "$OCF_CHECK_LEVEL" ]; then
 	OCF_CHECK_LEVEL=0
 fi
 
-if [ -z "$OCF_RESKEY_monitor_link" ]; then
+if [ "${OCF_RESKEY_monitor_link}" = "no" ] ||
+   [ "${OCF_RESKEY_monitor_link}" = "0" ]; then
+        OCF_RESKEY_monitor_link="no"
+else
         OCF_RESKEY_monitor_link="yes"
 fi
 
-
 case $1 in
 start)
 	if address_configured ${OCF_RESKEY_family} ${OCF_RESKEY_address}; then


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

only message in thread, other threads:[~2009-03-12 15:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-03-12 15:10 resource-agents: master - rgmanager: Fix ip start phase with monitor_link="0" Lon Hohberger

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