mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-18 12:20:42 +01:00
Improve interface_is_usable()
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
3d575a45bd
commit
60bde6231a
@ -179,14 +179,14 @@ interface_is_usable() # $1 = interface
|
|||||||
local status;
|
local status;
|
||||||
status=0
|
status=0
|
||||||
|
|
||||||
if [ "$1" != lo ]; then
|
if [ "$1" != lo -a "$COMMAND" != enable ]; then
|
||||||
if [ $g_family -eq 4 ]; 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
|
run_isusable_exit $1
|
||||||
status=$?
|
status=$?
|
||||||
fi
|
fi
|
||||||
else
|
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
|
run_isusable_exit $1
|
||||||
status=$?
|
status=$?
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user