1 From fb5a76d9050c60b601a5dbbad65ed3dbff041af1 Mon Sep 17 00:00:00 2001
2 From: Scott Little <scott.little@windriver.com>
3 Date: Mon, 2 Oct 2017 15:12:36 -0400
4 Subject: [PATCH 03/13] WRS: Patch1107: ipaddr2_check_if_state.patch
7 heartbeat/IPaddr2 | 21 ++++++++++++++++++---
8 1 file changed, 18 insertions(+), 3 deletions(-)
10 diff --git a/heartbeat/IPaddr2 b/heartbeat/IPaddr2
11 index aef6dc7..67a7ca3 100755
12 --- a/heartbeat/IPaddr2
13 +++ b/heartbeat/IPaddr2
14 @@ -964,7 +964,12 @@ ip_start() {
15 local ip_status=`ip_served`
17 if [ "$ip_status" = "ok" ]; then
19 + if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
23 + exit $OCF_ERR_GENERIC
27 if [ -n "$IP_CIP" ] && ([ $ip_status = "no" ] || [ $ip_status = "partial2" ]); then
28 @@ -1023,7 +1028,12 @@ ip_start() {
33 + if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
37 + exit $OCF_ERR_GENERIC
42 @@ -1099,7 +1109,12 @@ ip_monitor() {
45 run_arp_sender refresh
47 + if [ -n "`ip link show $NIC | grep \"state UP\"`" ]
51 + return $OCF_NOT_RUNNING