Robert Sander
2013-05-24 20:44:39 UTC
Signed-off-by: Robert Sander <***@heinlein-support.de>
---
heartbeat/Route | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/heartbeat/Route b/heartbeat/Route
index 7e28f03..3b775f1 100755
--- a/heartbeat/Route
+++ b/heartbeat/Route
@@ -201,7 +201,7 @@ route_stop() {
}
route_status() {
- show_output="$(ip route show $(create_route_spec) 2>/dev/null)"
+ show_output="$(ip $addr_family route show $(create_route_spec) 2>/dev/null)"
if [ $? -eq 0 ]; then
if [ -n "$show_output" ]; then
# "ip route show" returned zero, and produced output on
@@ -290,6 +290,12 @@ for binary in ip grep; do
done
route_validate || exit $?
+
+addr_family="-4"
+if echo ${OCF_RESKEY_destination} | grep -q ":" ; then
+ addr_family="-6"
+fi
+
case $__OCF_ACTION in
start) route_start;;
stop) route_stop;;
---
heartbeat/Route | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/heartbeat/Route b/heartbeat/Route
index 7e28f03..3b775f1 100755
--- a/heartbeat/Route
+++ b/heartbeat/Route
@@ -201,7 +201,7 @@ route_stop() {
}
route_status() {
- show_output="$(ip route show $(create_route_spec) 2>/dev/null)"
+ show_output="$(ip $addr_family route show $(create_route_spec) 2>/dev/null)"
if [ $? -eq 0 ]; then
if [ -n "$show_output" ]; then
# "ip route show" returned zero, and produced output on
@@ -290,6 +290,12 @@ for binary in ip grep; do
done
route_validate || exit $?
+
+addr_family="-4"
+if echo ${OCF_RESKEY_destination} | grep -q ":" ; then
+ addr_family="-6"
+fi
+
case $__OCF_ACTION in
start) route_start;;
stop) route_stop;;
--
1.7.10.4
1.7.10.4