cluster: STABLE3 - rgmanager: Fix ip start phase with monitor_link="0"
Lon Hohberger
lon@fedoraproject.org
Mon Mar 9 17:02:00 GMT 2009
Gitweb: http://git.fedorahosted.org/git/cluster.git?p=cluster.git;a=commitdiff;h=6d79b0bbb45ad167e75aae57ab2b0a4fe90fb514
Commit: 6d79b0bbb45ad167e75aae57ab2b0a4fe90fb514
Parent: b425976d04feefe64f36566b6afe60f474c6955f
Author: Lon Hohberger <lhh@redhat.com>
AuthorDate: Mon Mar 9 11:40:40 2009 -0400
Committer: Lon Hohberger <lhh@redhat.com>
CommitterDate: Mon Mar 9 13:01:42 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
More information about the Cluster-cvs
mailing list