forked from extern/shorewall_code
Fix two library loading issues; bring forward UP fix
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@4411 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
b5d199fd9b
commit
1f9c335da7
@ -109,7 +109,7 @@ __EOF__
|
||||
# Add Provider $table ($number)
|
||||
#
|
||||
__EOF__
|
||||
save_command "if [ \"\$(find_first_interface_address_if_any $interface)\" != 0.0.0.0 ]; then"
|
||||
save_command "if interface_is_up $interface && [ \"\$(find_first_interface_address_if_any $interface)\" != 0.0.0.0 ]; then"
|
||||
save_indent1="$INDENT"
|
||||
INDENT="$INDENT "
|
||||
|
||||
|
@ -78,7 +78,6 @@ strip_file_and_clib_load() # $1 = logical file, $2 = library to load if logical
|
||||
strip_file $1 $f
|
||||
|
||||
if [ -s $TMP_DIR/$1 ]; then
|
||||
shift
|
||||
clib_load $2 $3 "Entries in the $f file require the Shorewall compiler module ${SHAREDIR}/clib.$2 which is not installed"
|
||||
fi
|
||||
}
|
||||
@ -90,7 +89,6 @@ strip_file_and_lib_load() # $1 = logical file, $2 = library to load if logical f
|
||||
strip_file $1 $f
|
||||
|
||||
if [ -s $TMP_DIR/$1 ]; then
|
||||
shift
|
||||
lib_load $2 $3 "Entries in the $f file require the Shorewall library ${SHAREDIR}/lib.$2 which is not installed"
|
||||
fi
|
||||
}
|
||||
@ -6162,6 +6160,10 @@ combine_list()
|
||||
echo \$o
|
||||
}
|
||||
|
||||
interface_is_up() {
|
||||
test -n "\$(ip link ls dev \$1 | grep -e '[<,]UP[,>]')"
|
||||
}
|
||||
|
||||
#
|
||||
# Initialize environment
|
||||
#
|
||||
|
@ -1085,6 +1085,13 @@ find_interface_by_mac() {
|
||||
done
|
||||
}
|
||||
|
||||
#
|
||||
# Determine if an interface is in the UP state
|
||||
#
|
||||
interface_is_up() {
|
||||
test -n "$(ip link ls dev $1 | grep -e '[<,]UP[,>]')"
|
||||
}
|
||||
|
||||
#
|
||||
# Find interface address--returns the first IP address assigned to the passed
|
||||
# device
|
||||
|
@ -1567,8 +1567,7 @@ make_verbose() {
|
||||
#
|
||||
debugging=
|
||||
|
||||
if [ $# -gt 0 ] ; then
|
||||
if [ "$1" = "debug" ] || [ "$1" = "trace" ]; then
|
||||
if [ $# -gt 0 ] && [ "x$1" = "xdebug" ] || [ "x$1" = "xtrace" ]; then
|
||||
debugging=debug
|
||||
shift
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user