]> git.ipfire.org Git - people/stevee/ipfire-2.x.git/commitdiff
ids-functions.pl: Check if the file exists bevore adding it to the
authorStefan Schantl <stefan.schantl@ipfire.org>
Fri, 2 Apr 2021 07:34:28 +0000 (09:34 +0200)
committerStefan Schantl <stefan.schantl@ipfire.org>
Sun, 19 Dec 2021 12:23:43 +0000 (13:23 +0100)
oinkmaster provider includes file.

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

index 28fbc2654d10086e3ece42223eb955536a0d9398..db5ef46660a7a81fe57a1edf08dea2721bf7afbe 100644 (file)
@@ -946,8 +946,8 @@ sub alter_oinkmaster_provider_includes_file ($$) {
                print FILE "$line\n";
        }
 
-       # Add the provider to the file if requested.
-       if ($action eq "add") {
+       # Check if the file exists and add the provider if requested.
+       if ((-f $provider_modified_sids_file) && ($action eq "add")) {
                print FILE "include $provider_modified_sids_file\n";
        }