Skip to content

Commit

Permalink
ethmonitor: fix to be able to monitor interface without IP
Browse files Browse the repository at this point in the history
  • Loading branch information
oalbrigt committed Mar 24, 2017
1 parent 3599492 commit 8ec7bd4
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions heartbeat/ethmonitor
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,9 @@ is_interface() {
#
# List interfaces but exclude FreeS/WAN ipsecN virtual interfaces
#
local iface=`$IP2UTIL -o -f inet addr show | grep " $1 " \
| cut -d ' ' -f2 | sort -u | grep -v '^ipsec[0-9][0-9]*$'`
local iface=`$IP2UTIL -o -f link addr show | grep " $1:" \
| cut -d ' ' -f2 | sort -u | grep -v '^ipsec[0-9][0-9]*$' \
| sed -e 's/:$//'`
[ "$iface" != "" ]
}

Expand Down

0 comments on commit 8ec7bd4

Please sign in to comment.