mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-28 11:43:25 +02:00
ids.cgi: Only write oinkmaster-modify-sids.conf if neccessary.
Only write to the file if the runmode of the IDS has been changed. Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
This commit is contained in:
@@ -517,6 +517,8 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'update'}) {
|
||||
# Generate file to store the home net.
|
||||
&generate_home_net_file();
|
||||
|
||||
# Check if the runmode has been changed.
|
||||
if($cgiparams{'RUN_MODE'} ne $oldidssettings{'RUN_MODE'}) {
|
||||
# Open modify sid's file for writing.
|
||||
open(FILE, ">$modify_sids_file") or die "Could not write to $modify_sids_file. $!\n";
|
||||
|
||||
@@ -532,8 +534,6 @@ if ($cgiparams{'RULESET'} eq $Lang::tr{'update'}) {
|
||||
# Close file handle.
|
||||
close(FILE);
|
||||
|
||||
# Check if the runmode has been changed.
|
||||
if($cgiparams{'RUN_MODE'} ne $oldidssettings{'RUN_MODE'}) {
|
||||
# Check if a ruleset exists.
|
||||
if (%idsrules) {
|
||||
# Lock the webpage and print message.
|
||||
|
||||
Reference in New Issue
Block a user