From: Stefan Schantl Date: Sun, 4 Apr 2021 10:22:13 +0000 (+0200) Subject: ids-functions.pl: Only write existing provider specific used rulesfiles X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a98d7b43ff9bdbbe9ebdd02763d369b68158cfd6;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Only write existing provider specific used rulesfiles files into main include yaml file. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index e305be15f7..2b5f9cb104 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -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.