From 60bde6231ada8c5c9c765aebd5f3987b3c688117 Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Sun, 13 May 2012 13:49:59 -0700 Subject: [PATCH] Improve interface_is_usable() Signed-off-by: Tom Eastep --- Shorewall/lib.core | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Shorewall/lib.core b/Shorewall/lib.core index 660143cf7..1ce4f8fe1 100644 --- a/Shorewall/lib.core +++ b/Shorewall/lib.core @@ -179,14 +179,14 @@ interface_is_usable() # $1 = interface local status; status=0 - if [ "$1" != lo ]; then + if [ "$1" != lo -a "$COMMAND" != enable ]; then if [ $g_family -eq 4 ]; then - if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 -a "$COMMAND" != enable ]; then + if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != 0.0.0.0 ]; then run_isusable_exit $1 status=$? fi else - if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: -a "$COMMAND" != enable ]; then + if interface_is_up $1 && [ "$(find_first_interface_address_if_any $1)" != :: ]; then run_isusable_exit $1 status=$? fi