mirror of
https://gitlab.com/shorewall/code.git
synced 2025-06-19 17:28:35 +02:00
Add origin comments to command-mode rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
48df3d9627
commit
6085c6092f
@ -7952,7 +7952,7 @@ sub emitr( $$ ) {
|
|||||||
#
|
#
|
||||||
enter_cat_mode unless $mode == CAT_MODE;
|
enter_cat_mode unless $mode == CAT_MODE;
|
||||||
|
|
||||||
if ( ( my $origin = $ruleref->{origin} ) && $config{TRACK_RULES} eq 'File' ) {
|
if ( $config{TRACK_RULES} eq 'File' && ( my $origin = $ruleref->{origin} ) ) {
|
||||||
emit_unindented '# ' . $origin;
|
emit_unindented '# ' . $origin;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -7966,6 +7966,9 @@ sub emitr( $$ ) {
|
|||||||
if ( exists $ruleref->{cmd} ) {
|
if ( exists $ruleref->{cmd} ) {
|
||||||
emit join( '', ' ' x $ruleref->{cmdlevel}, $ruleref->{cmd} );
|
emit join( '', ' ' x $ruleref->{cmdlevel}, $ruleref->{cmd} );
|
||||||
} else {
|
} else {
|
||||||
|
if ( $config{TRACK_RULES} eq 'File' && ( my $origin = $ruleref->{origin} ) ) {
|
||||||
|
emit join( '', ' ' x $ruleref->{cmdlevel} , '# ' , $origin );
|
||||||
|
}
|
||||||
#
|
#
|
||||||
# Must preserve quotes in the rule
|
# Must preserve quotes in the rule
|
||||||
#
|
#
|
||||||
|
Loading…
x
Reference in New Issue
Block a user