From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Schantl To: development@lists.ipfire.org Subject: [PATCH] convert-snort: Fix logic for detecting enough free disk space. Date: Mon, 08 Apr 2019 20:02:53 +0200 Message-ID: <20190408180253.5394-1-stefan.schantl@ipfire.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3334685465854444910==" List-Id: --===============3334685465854444910== Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable The subfunction only will return something if the check fails - so the logic of the if statement was wrong set and the downloader only was called if this check failed and to less diskspace would be available. Signed-off-by: Stefan Schantl --- config/suricata/convert-snort | 3 +++ 1 file changed, 3 insertions(+) diff --git a/config/suricata/convert-snort b/config/suricata/convert-snort index ca650b149..19aa38fbc 100644 --- a/config/suricata/convert-snort +++ b/config/suricata/convert-snort @@ -231,6 +231,9 @@ if (-f $snort_rules_tarball) { } else { # Check if enought disk space is available. if(&IDS::checkdiskspace()) { + # Print error message. + print "Could not download ruleset - Not enough free diskspace available.\n= "; + } else { # Call the download function and grab the new ruleset. &IDS::downloadruleset(); } --=20 2.20.1 --===============3334685465854444910==--