]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/commitdiff
ids-functions.pl: Only write existing provider specific used rulesfiles
authorStefan Schantl <stefan.schantl@ipfire.org>
Sun, 4 Apr 2021 10:22:13 +0000 (12:22 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:23:44 +0000 (13:23 +0100)
files into main include yaml file.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
config/cfgroot/ids-functions.pl

index e305be15f7df2da041fb6121bc2fa3af21888626..2b5f9cb1044c12ca5a932e2f6e2310d0a1108d70 100644 (file)
@@ -1408,8 +1408,11 @@ sub write_main_used_rulefiles_file (@) {
                # Call function to get the providers used rulefiles file.
                my $filename = &get_used_provider_rulesfile_file($provider);
 
-               # Print the provider to the file.
-               print FILE "include\: $filename\n";
+               # Check if the file exists and write it into the used rulefiles file.
+               if (-f $filename) {
+                       # Print the provider to the file.
+                       print FILE "include\: $filename\n";
+               }
        }
 
        # Always include the file which hold the static includes.