From: Stefan Schantl Date: Fri, 2 Apr 2021 07:34:28 +0000 (+0200) Subject: ids-functions.pl: Check if the file exists bevore adding it to the X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b082d5fea38018918e180ba73c18237a08bac229;p=people%2Fstevee%2Fipfire-2.x.git ids-functions.pl: Check if the file exists bevore adding it to the oinkmaster provider includes file. Signed-off-by: Stefan Schantl --- diff --git a/config/cfgroot/ids-functions.pl b/config/cfgroot/ids-functions.pl index 28fbc2654d..db5ef46660 100644 --- a/config/cfgroot/ids-functions.pl +++ b/config/cfgroot/ids-functions.pl @@ -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"; }