|
|
15568e |
From 0a197f1cd227e768837dff778a0c56fc1085d434 Mon Sep 17 00:00:00 2001
|
|
|
15568e |
From: Oyvind Albrigtsen <oalbrigt@redhat.com>
|
|
|
15568e |
Date: Mon, 21 Feb 2022 13:54:04 +0100
|
|
|
15568e |
Subject: [PATCH] IPsrcaddr: fix indentation in better error message code
|
|
|
15568e |
|
|
|
15568e |
---
|
|
|
15568e |
heartbeat/IPsrcaddr | 30 +++++++++++++++---------------
|
|
|
15568e |
1 file changed, 15 insertions(+), 15 deletions(-)
|
|
|
15568e |
|
|
|
15568e |
diff --git a/heartbeat/IPsrcaddr b/heartbeat/IPsrcaddr
|
|
|
15568e |
index f0216722d..c82adc0e9 100755
|
|
|
15568e |
--- a/heartbeat/IPsrcaddr
|
|
|
15568e |
+++ b/heartbeat/IPsrcaddr
|
|
|
15568e |
@@ -542,27 +542,27 @@ fi
|
|
|
15568e |
findif_out=`$FINDIF -C`
|
|
|
15568e |
rc=$?
|
|
|
15568e |
[ $rc -ne 0 ] && {
|
|
|
15568e |
- ocf_exit_reason "[$FINDIF -C] failed"
|
|
|
15568e |
- exit $rc
|
|
|
15568e |
+ ocf_exit_reason "[$FINDIF -C] failed"
|
|
|
15568e |
+ exit $rc
|
|
|
15568e |
}
|
|
|
15568e |
|
|
|
15568e |
INTERFACE=`echo $findif_out | awk '{print $1}'`
|
|
|
15568e |
if [ "$OCF_RESKEY_destination" = "0.0.0.0/0" ] ;then
|
|
|
15568e |
NETWORK=`$IP2UTIL route list dev $INTERFACE scope link $PROTO match $ipaddress|grep -m 1 -o '^[^ ]*'`
|
|
|
15568e |
|
|
|
15568e |
- if [ -z "$NETWORK" ]; then
|
|
|
15568e |
- err_str="command '$IP2UTIL route list dev $INTERFACE scope link $PROTO"
|
|
|
15568e |
- err_str="$err_str match $ipaddress' failed to find a matching route"
|
|
|
15568e |
-
|
|
|
15568e |
- if [ "$__OCF_ACTION" = "start" ]; then
|
|
|
15568e |
- ocf_exit_reason "$err_str"
|
|
|
15568e |
- exit $OCF_ERR_ARGS
|
|
|
15568e |
- elif ! ocf_is_probe; then
|
|
|
15568e |
- ocf_log warn "$err_str"
|
|
|
15568e |
- else
|
|
|
15568e |
- ocf_log debug "$err_str"
|
|
|
15568e |
- fi
|
|
|
15568e |
- fi
|
|
|
15568e |
+ if [ -z "$NETWORK" ]; then
|
|
|
15568e |
+ err_str="command '$IP2UTIL route list dev $INTERFACE scope link $PROTO"
|
|
|
15568e |
+ err_str="$err_str match $ipaddress' failed to find a matching route"
|
|
|
15568e |
+
|
|
|
15568e |
+ if [ "$__OCF_ACTION" = "start" ]; then
|
|
|
15568e |
+ ocf_exit_reason "$err_str"
|
|
|
15568e |
+ exit $OCF_ERR_ARGS
|
|
|
15568e |
+ elif ! ocf_is_probe; then
|
|
|
15568e |
+ ocf_log warn "$err_str"
|
|
|
15568e |
+ else
|
|
|
15568e |
+ ocf_log debug "$err_str"
|
|
|
15568e |
+ fi
|
|
|
15568e |
+ fi
|
|
|
15568e |
else
|
|
|
15568e |
NETWORK="$OCF_RESKEY_destination"
|
|
|
15568e |
fi
|