mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-26 12:42:40 +02:00
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)
|
# Add Provider $table ($number)
|
||||||
#
|
#
|
||||||
__EOF__
|
__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"
|
save_indent1="$INDENT"
|
||||||
INDENT="$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
|
strip_file $1 $f
|
||||||
|
|
||||||
if [ -s $TMP_DIR/$1 ]; then
|
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"
|
clib_load $2 $3 "Entries in the $f file require the Shorewall compiler module ${SHAREDIR}/clib.$2 which is not installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -90,7 +89,6 @@ strip_file_and_lib_load() # $1 = logical file, $2 = library to load if logical f
|
|||||||
strip_file $1 $f
|
strip_file $1 $f
|
||||||
|
|
||||||
if [ -s $TMP_DIR/$1 ]; then
|
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"
|
lib_load $2 $3 "Entries in the $f file require the Shorewall library ${SHAREDIR}/lib.$2 which is not installed"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
@ -6162,6 +6160,10 @@ combine_list()
|
|||||||
echo \$o
|
echo \$o
|
||||||
}
|
}
|
||||||
|
|
||||||
|
interface_is_up() {
|
||||||
|
test -n "\$(ip link ls dev \$1 | grep -e '[<,]UP[,>]')"
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Initialize environment
|
# Initialize environment
|
||||||
#
|
#
|
||||||
|
@ -1085,6 +1085,13 @@ find_interface_by_mac() {
|
|||||||
done
|
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
|
# Find interface address--returns the first IP address assigned to the passed
|
||||||
# device
|
# device
|
||||||
|
@ -1567,8 +1567,7 @@ make_verbose() {
|
|||||||
#
|
#
|
||||||
debugging=
|
debugging=
|
||||||
|
|
||||||
if [ $# -gt 0 ] ; then
|
if [ $# -gt 0 ] && [ "x$1" = "xdebug" ] || [ "x$1" = "xtrace" ]; then
|
||||||
if [ "$1" = "debug" ] || [ "$1" = "trace" ]; then
|
|
||||||
debugging=debug
|
debugging=debug
|
||||||
shift
|
shift
|
||||||
fi
|
fi
|
||||||
|
Loading…
x
Reference in New Issue
Block a user