]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
convert-snort: Fix logic for detecting enough free disk space.
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 8 Apr 2019 18:02:53 +0000 (20:02 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Apr 2019 20:15:35 +0000 (21:15 +0100)
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 <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/suricata/convert-snort

index ca650b149a212d9f0074297d78626fec96d8fd11..19aa38fbc3c667ba43b17945e72c67f8abfaf995 100644 (file)
@@ -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();
        }