cluster: RHEL55 - Revert "rgmanager: Fix monitor_link="0" starts" - wrong bz#

Lon Hohberger lon at fedoraproject.org
Fri Nov 6 22:29:28 UTC 2009


Gitweb:        http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=3667749b71da459b482d80d7332799b89c5fc362
Commit:        3667749b71da459b482d80d7332799b89c5fc362
Parent:        8b1823e4537514c0e122bf680cc74c1e7a84a466
Author:        Lon Hohberger <lhh at redhat.com>
AuthorDate:    Fri Nov 6 17:28:17 2009 -0500
Committer:     Lon Hohberger <lhh at redhat.com>
CommitterDate: Fri Nov 6 17:28:17 2009 -0500

Revert "rgmanager: Fix monitor_link="0" starts" - wrong bz#

This reverts commit 8b1823e4537514c0e122bf680cc74c1e7a84a466.
---
 rgmanager/src/resources/ip.sh |   36 +++++++++++++++++-------------------
 1 files changed, 17 insertions(+), 19 deletions(-)

diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
index e9779a2..d9bc517 100755
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -564,14 +564,10 @@ ipv6()
                         if [ $? -ne 0 ]; then
                                 continue
                         fi
-
-			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
-				network_link_up $dev
-				if [ $? -ne 0 ]; then
-					continue
-				fi
-			fi
-
+                        network_link_up $dev
+                        if [ $? -ne 0 ]; then
+                                continue
+                        fi
 			if [ "${addr/\/*/}" = "${addr}" ]; then
 				addr="$addr/$maskbits"
 			fi
@@ -637,11 +633,9 @@ ipv4()
 			if [ $? -ne 0 ]; then
 			        continue
 			fi
-			if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
-				network_link_up $dev
-				if [ $? -ne 0 ]; then
-					continue
-				fi
+			network_link_up $dev
+			if [ $? -ne 0 ]; then
+				continue
 			fi
 
 			if [ "${addr/\/*/}" = "${addr}" ]; then
@@ -757,9 +751,15 @@ 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"
@@ -771,7 +771,7 @@ ip_op()
 		fi
 		ocf_log debug "$3 present on $dev"
 		
-		if [ "$OCF_RESKEY_monitor_link" = "yes" ]; then
+		if [ "$monitor_link" = "yes" ]; then
 			if ! network_link_up $dev; then
 		        	ocf_log warn "No link on $dev..."
 				return 1
@@ -822,13 +822,11 @@ if [ -z "$OCF_CHECK_LEVEL" ]; then
 	OCF_CHECK_LEVEL=0
 fi
 
-if [ "${OCF_RESKEY_monitor_link}" = "no" ] ||
-   [ "${OCF_RESKEY_monitor_link}" = "0" ]; then
-        OCF_RESKEY_monitor_link="no"
-else
+if [ -z "$OCF_RESKEY_monitor_link" ]; then
         OCF_RESKEY_monitor_link="yes"
 fi
 
+
 case $1 in
 start)
 	if address_configured ${OCF_RESKEY_family} ${OCF_RESKEY_address}; then


More information about the cluster-commits mailing list