From: Stefan Schantl Date: Sun, 20 Mar 2022 15:10:01 +0000 (+0100) Subject: ids-functions.pl: Use "enabled/disabled" to mark if a rule should be X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=2deba6bf4a6b866713ee000a91457802101fa893;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Use "enabled/disabled" to mark if a rule should be altered. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index d318f464a2..e09fe04859 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -751,10 +751,10 @@ sub process_ruleset(@) { next if ($rev lt $rules{$sid}); # Check if the rule should be enabled or disabled. - if ($modifications{$sid} eq "on") { + if ($modifications{$sid} eq "enabled") { # Drop the # at the start of the line. $line =~ s/^\#//; - } elsif ($modifications{$sid} eq "off") { + } elsif ($modifications{$sid} eq "disabled") { # Add a # at the start of the line to disable the rule. $line = "#$line" unless ($line =~ /^#/); }