forked from extern/shorewall_code
Allow a provider name in addition to an interface name in enable/disable
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
d27965a4d2
commit
568e3b2e5b
@ -780,7 +780,7 @@ sub add_a_provider( $$ ) {
|
|||||||
"qt \$TC qdisc del dev $physical root",
|
"qt \$TC qdisc del dev $physical root",
|
||||||
"qt \$TC qdisc del dev $physical ingress\n" ) if $tcdevices->{$interface};
|
"qt \$TC qdisc del dev $physical ingress\n" ) if $tcdevices->{$interface};
|
||||||
|
|
||||||
emit( "progress_message2 \"Provider $table stopped\"" );
|
emit( "progress_message2 \" Provider $table ($number) stopped\"" );
|
||||||
|
|
||||||
pop_indent;
|
pop_indent;
|
||||||
|
|
||||||
@ -1125,14 +1125,21 @@ EOF
|
|||||||
for my $provider (@providers ) {
|
for my $provider (@providers ) {
|
||||||
my $providerref = $providers{$provider};
|
my $providerref = $providers{$provider};
|
||||||
|
|
||||||
emit( "$providerref->{physical})",
|
if ( $providerref->{optional} ) {
|
||||||
" if [ -z \"`\$IP -$family route ls table $providerref->{number}`\" ]; then",
|
if ( $providerref->{shared} || $providerref->{physical} eq $provider) {
|
||||||
|
emit "$provider})";
|
||||||
|
} else {
|
||||||
|
emit( "$providerref->{physical}|$provider)" );
|
||||||
|
}
|
||||||
|
|
||||||
|
emit ( " if [ -z \"`\$IP -$family route ls table $providerref->{number}`\" ]; then",
|
||||||
" start_provider_$provider",
|
" start_provider_$provider",
|
||||||
' else',
|
' else',
|
||||||
' startup_error "Interface $g_interface is already enabled"',
|
' startup_error "Interface $g_interface is already enabled"',
|
||||||
' fi',
|
' fi',
|
||||||
' ;;'
|
' ;;'
|
||||||
) if $providerref->{optional};
|
);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pop_indent;
|
pop_indent;
|
||||||
@ -1140,7 +1147,7 @@ EOF
|
|||||||
|
|
||||||
emit << 'EOF';;
|
emit << 'EOF';;
|
||||||
*)
|
*)
|
||||||
startup_error "$g_interface is not an optional provider interface"
|
startup_error "$g_interface is not an optional provider or provider interface"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user