forked from extern/shorewall_code
Move recent changes to trunk
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9359 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
ca96c9795f
commit
0534de0b9c
@ -457,10 +457,10 @@ sub add_a_provider( $$$$$$$$ ) {
|
||||
emit 'else';
|
||||
|
||||
if ( $optional ) {
|
||||
emit ( " error_message \"WARNING: Interface $interface is not configured -- Provider $table ($number) not Added\"",
|
||||
emit ( " error_message \"WARNING: Interface $interface is not usable -- Provider $table ($number) not Added\"",
|
||||
" ${base}_IS_UP=" );
|
||||
} else {
|
||||
emit( " fatal_error \"Interface $interface is not configured -- Provider $table ($number) Cannot be Added\"" );
|
||||
emit( " fatal_error \"Interface $interface is not usable -- Provider $table ($number) Cannot be Added\"" );
|
||||
}
|
||||
|
||||
emit "fi\n";
|
||||
@ -632,9 +632,15 @@ sub setup_providers() {
|
||||
emit ( " qt ip -$family route del default table " . MAIN_TABLE ) if $config{USE_DEFAULT_RT};
|
||||
emit ( " progress_message \"Default route '\$(echo \$DEFAULT_ROUTE | sed 's/\$\\s*//')' Added\"",
|
||||
'else',
|
||||
' error_message "WARNING: No Default route added (all \'balance\' providers are down)"',
|
||||
' restore_default_route',
|
||||
'fi',
|
||||
' error_message "WARNING: No Default route added (all \'balance\' providers are down)"' );
|
||||
|
||||
if ( $config{RESTORE_DEFAULT_ROUTE} ) {
|
||||
emit ' restore_default_route && error_message "NOTICE: Default route restored"'
|
||||
} else {
|
||||
emit qq( qt ip -$family route del default table $table && error_message "WARNING: Default route deleted from table $table");
|
||||
}
|
||||
|
||||
emit( 'fi',
|
||||
'' );
|
||||
} else {
|
||||
emit ( '#',
|
||||
|
@ -936,6 +936,8 @@ restore_default_route() {
|
||||
local default_route
|
||||
default_route=
|
||||
local route
|
||||
local result
|
||||
result=1
|
||||
|
||||
while read route ; do
|
||||
case $route in
|
||||
@ -951,6 +953,7 @@ restore_default_route() {
|
||||
;;
|
||||
*)
|
||||
qt ip -4 route replace $default_route && \
|
||||
result=0 && \
|
||||
progress_message "Default Route (${default_route# }) restored"
|
||||
;;
|
||||
esac
|
||||
@ -968,6 +971,8 @@ restore_default_route() {
|
||||
|
||||
rm -f ${VARDIR}/default_route
|
||||
fi
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
#
|
||||
|
@ -856,6 +856,8 @@ restore_default_route() {
|
||||
local default_route
|
||||
default_route=
|
||||
local route
|
||||
local result
|
||||
result=1
|
||||
|
||||
while read route ; do
|
||||
case $route in
|
||||
@ -871,6 +873,7 @@ restore_default_route() {
|
||||
;;
|
||||
*)
|
||||
qt ip -6 route replace $default_route && \
|
||||
result=0 && \
|
||||
progress_message "Default Route (${default_route# }) restored"
|
||||
;;
|
||||
esac
|
||||
@ -888,6 +891,8 @@ restore_default_route() {
|
||||
|
||||
rm -f ${VARDIR}/default_route
|
||||
fi
|
||||
|
||||
return $result
|
||||
}
|
||||
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user