forked from extern/shorewall_code
Add enabled and disabled user exits
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
5a24953e6c
commit
80e6cd8a2f
@ -109,7 +109,7 @@ sub generate_script_1( $ ) {
|
||||
################################################################################
|
||||
EOF
|
||||
|
||||
for my $exit ( qw/init start tcclear started stop stopped clear refresh refreshed restored/ ) {
|
||||
for my $exit ( qw/init start tcclear started stop stopped clear refresh refreshed restored enabled disabled/ ) {
|
||||
emit "\nrun_${exit}_exit() {";
|
||||
push_indent;
|
||||
append_file $exit or emit 'true';
|
||||
|
@ -1088,7 +1088,11 @@ CEOF
|
||||
emit( "setup_${dev}_tc" ) if $tcdevices->{$interface};
|
||||
}
|
||||
|
||||
emit( qq(rm -f \${VARDIR}/${physical}_disabled) );
|
||||
emit( qq(rm -f \${VARDIR}/${physical}_disabled),
|
||||
'',
|
||||
'run_enabled_exit'
|
||||
);
|
||||
|
||||
emit_started_message( '', 2, $pseudo, $table, $number );
|
||||
|
||||
if ( get_interface_option( $interface, 'used_address_variable' ) || get_interface_option( $interface, 'used_gateway_variable' ) ) {
|
||||
@ -1233,7 +1237,10 @@ CEOF
|
||||
"qt \$TC qdisc del dev $physical ingress\n" ) if $tcdevices->{$interface};
|
||||
}
|
||||
|
||||
emit( "echo 1 > \${VARDIR}/${physical}.status" );
|
||||
emit( "echo 1 > \${VARDIR}/${physical}.status",
|
||||
'',
|
||||
'run_disabled_exit'
|
||||
);
|
||||
|
||||
if ( $pseudo ) {
|
||||
emit( "progress_message2 \" Optional Interface $table stopped\"" );
|
||||
|
Loading…
Reference in New Issue
Block a user