Correct interface_is_up() to look for the 'state' as well as 'UP'

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2018-05-12 08:09:46 -07:00
parent 78269d57bc
commit c02b71b530
No known key found for this signature in database
GPG Key ID: 96E6B3F2423A4D10

View File

@ -192,7 +192,7 @@ find_default_interface() {
# Determine if Interface is up
#
interface_is_up() {
[ -n "$($IP -$g_family link list dev $1 2> /dev/null | grep -e '[<,]UP[,>]')" ]
[ -n "$($IP -$g_family link list dev $1 2> /dev/null | grep -e '[<,]UP[,>]' | grep -v ' state DOWN ')" ]
}
#