public inbox for cluster-cvs@sourceware.org help / color / mirror / Atom feed
From: Lon Hohberger <lon@fedoraproject.org> To: cluster-cvs-relay@redhat.com Subject: resource-agents: master - rgmanager: Fix ip start phase with monitor_link="0" Date: Thu, 12 Mar 2009 15:10:00 -0000 [thread overview] Message-ID: <20090312150932.7E86C120198@lists.fedorahosted.org> (raw) 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
reply other threads:[~2009-03-12 15:10 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20090312150932.7E86C120198@lists.fedorahosted.org \ --to=lon@fedoraproject.org \ --cc=cluster-cvs-relay@redhat.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).