]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/cfgroot/ids-functions.pl
ids-functions.pl: Do not delete the whitelist file on rulesdir cleanup.
[people/pmueller/ipfire-2.x.git] / config / cfgroot / ids-functions.pl
index 5530da11eb1f6cddcfd98ab59cdc41e4a7a1804d..88734a3caababc80bf42d54384d49d980da55ca4 100644 (file)
@@ -572,6 +572,9 @@ sub _cleanup_rulesdir() {
                # Skip element if it has config as file extension.
                next if ($file =~ m/\.config$/);
 
+               # Skip rules file for whitelisted hosts.
+               next if ("$rulespath/$file" eq $whitelist_file);
+
                # Delete the current processed file, if not, exit this function
                # and return an error message.
                unlink("$rulespath/$file") or return "Could not delete $rulespath/$file. $!\n";