Gitweb:
http://git.fedorahosted.org/git/resource-agents.git?p=resource-agents.git...
Commit: 488c4ff3a1c3ed1734a00f86d8b639f06e146a11
Parent: 394c23c8f9e1e0fb934ba994e2e5a786467d6bec
Author: Marek 'marx' Grac <mgrac(a)redhat.com>
AuthorDate: Fri Jan 28 15:29:48 2011 +0100
Committer: Marek 'marx' Grac <mgrac(a)redhat.com>
CommitterDate: Fri Jan 28 15:29:48 2011 +0100
resource-agents: Add option disable_rdisc to ip.sh
rdisc is called by ip.sh which causes static routes to be updated by
dynamic ones. This option adds possibility to disable this feature.
Resolves: rhbz#621538
---
rgmanager/src/resources/ip.sh | 21 +++++++++++++++++++--
1 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/rgmanager/src/resources/ip.sh b/rgmanager/src/resources/ip.sh
old mode 100644
new mode 100755
index 714da05..f9256e7
--- a/rgmanager/src/resources/ip.sh
+++ b/rgmanager/src/resources/ip.sh
@@ -101,6 +101,17 @@ meta_data()
<content type="string"/>
</parameter>
+ <parameter name="disable_rdisc">
+ <longdesc lang="en">
+ Disable updating of routing using RDISC protocol and
+ preserve static routes.
+ </longdesc>
+ <shortdesc lang="en">
+ Disable updating of routing using RDISC protocol
+ </shortdesc>
+ <content type="boolean"/>
+ </parameter>
+
</parameters>
<actions>
@@ -611,7 +622,10 @@ ipv6()
# Not sure if this is necessary for ipv6 either.
file=$(which rdisc 2>/dev/null)
if [ -f "$file" ]; then
- killall -HUP rdisc || rdisc -fs
+ if [ "$OCF_RESKEY_disable_rdisc" != "yes" ] && \
+ [ "$OCF_RESKEY_disable_rdisc" != "1" ]; then
+ killall -HUP rdisc || rdisc -fs
+ fi
fi
return 0
@@ -690,7 +704,10 @@ ipv4()
file=$(which rdisc 2>/dev/null)
if [ -f "$file" ]; then
- killall -HUP rdisc || rdisc -fs
+ if [ "$OCF_RESKEY_disable_rdisc" != "yes" ] && \
+ [ "$OCF_RESKEY_disable_rdisc" != "1" ]; then
+ killall -HUP rdisc || rdisc -fs
+ fi
fi
return 0