mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-24 07:08:53 +01: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;
|
||||
|
||||
if ( ( my $origin = $ruleref->{origin} ) && $config{TRACK_RULES} eq 'File' ) {
|
||||
if ( $config{TRACK_RULES} eq 'File' && ( my $origin = $ruleref->{origin} ) ) {
|
||||
emit_unindented '# ' . $origin;
|
||||
}
|
||||
|
||||
@ -7966,6 +7966,9 @@ sub emitr( $$ ) {
|
||||
if ( exists $ruleref->{cmd} ) {
|
||||
emit join( '', ' ' x $ruleref->{cmdlevel}, $ruleref->{cmd} );
|
||||
} else {
|
||||
if ( $config{TRACK_RULES} eq 'File' && ( my $origin = $ruleref->{origin} ) ) {
|
||||
emit join( '', ' ' x $ruleref->{cmdlevel} , '# ' , $origin );
|
||||
}
|
||||
#
|
||||
# Must preserve quotes in the rule
|
||||
#
|
||||
|
Loading…
Reference in New Issue
Block a user