forked from extern/shorewall_code
Handle Debian pre-down/post-down correctly
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
579104833e
commit
9e9c44d4ac
@ -1438,7 +1438,7 @@ sub compile_updown() {
|
|||||||
q( COMMAND=enable) ,
|
q( COMMAND=enable) ,
|
||||||
q( detect_configuration),
|
q( detect_configuration),
|
||||||
q( enable_provider $1),
|
q( enable_provider $1),
|
||||||
q( else) ,
|
q( elif [ "$PHASE" != post-down ]; then # pre-down or not Debian) ,
|
||||||
q( progress_message3 "Attempting disable on interface $1") ,
|
q( progress_message3 "Attempting disable on interface $1") ,
|
||||||
q( COMMAND=disable) ,
|
q( COMMAND=disable) ,
|
||||||
q( detect_configuration),
|
q( detect_configuration),
|
||||||
@ -1478,22 +1478,30 @@ sub compile_updown() {
|
|||||||
|
|
||||||
emit( ' progress_message3 "$g_product attempting $COMMAND"',
|
emit( ' progress_message3 "$g_product attempting $COMMAND"',
|
||||||
' detect_configuration',
|
' detect_configuration',
|
||||||
' define_firewall' );
|
' define_firewall',
|
||||||
|
' elif [ "$PHASE" != pre-down ]; then # Not Debian pre-down phase'
|
||||||
|
);
|
||||||
|
|
||||||
|
push_indent;
|
||||||
|
|
||||||
if ( $wildcard ) {
|
if ( $wildcard ) {
|
||||||
emit( ' elif [ "$state" = started ]; then',
|
|
||||||
|
emit( ' if [ "$state" = started ]; then',
|
||||||
' progress_message3 "$g_product attempting restart"',
|
' progress_message3 "$g_product attempting restart"',
|
||||||
' COMMAND=restart',
|
' COMMAND=restart',
|
||||||
' detect_configuration',
|
' detect_configuration',
|
||||||
' define_firewall' );
|
' define_firewall',
|
||||||
|
' fi' );
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
emit( ' else',
|
emit( ' COMMAND=stop',
|
||||||
' COMMAND=stop',
|
' progress_message3 "$g_product attempting stop"',
|
||||||
' progress_message3 "$g_product attempting stop"',
|
' detect_configuration',
|
||||||
' detect_configuration',
|
' stop_firewall' );
|
||||||
' stop_firewall' );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pop_indent;
|
||||||
|
|
||||||
emit( ' fi',
|
emit( ' fi',
|
||||||
' ;;'
|
' ;;'
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user