]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
convert-snort: Re-order steps at end of script
authorStefan Schantl <stefan.schantl@ipfire.org>
Mon, 8 Apr 2019 18:20:18 +0000 (20:20 +0200)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 8 Apr 2019 20:15:35 +0000 (21:15 +0100)
This will ensure that the whole IDS is configured property, if
no or an empty snort config file is present.

Signed-off-by: Stefan Schantl <stefan.schantl@ipfire.org>
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
config/suricata/convert-snort

index 19aa38fbc3c667ba43b17945e72c67f8abfaf995..0ad2942b13ddded97ca829f42209ddd1ecd8ed6d 100644 (file)
@@ -253,7 +253,24 @@ if (-f $IDS::rulestarball) {
 }
 
 #
 }
 
 #
-## Step 8: Grab used ruleset files from snort config file and convert
+## Step 8: Generate file for the HOME Net.
+#
+
+# Call subfunction to generate the file.
+&IDS::generate_home_net_file();
+
+#
+## Step 9: Setup automatic ruleset updates.
+#
+
+# Check if a ruleset is configured.
+if($rulessettings{"RULES"}) {
+       # Call suricatactrl and setup the periodic update mechanism.
+       &IDS::call_suricatactrl("cron", $rulessettings{'AUTOUPDATE_INTERVAL'});
+}
+
+#
+## Step 10: Grab used ruleset files from snort config file and convert
 ##         them into the new format.
 #
 
 ##         them into the new format.
 #
 
@@ -298,23 +315,6 @@ close(SNORTCONF);
 # Pass the array of enabled rule files to the subfunction and write the file.
 &IDS::write_used_rulefiles_file(@enabled_rule_files);
 
 # Pass the array of enabled rule files to the subfunction and write the file.
 &IDS::write_used_rulefiles_file(@enabled_rule_files);
 
-#
-## Step 9: Generate file for the HOME Net.
-#
-
-# Call subfunction to generate the file.
-&IDS::generate_home_net_file();
-
-#
-## Step 10: Setup automatic ruleset updates.
-#
-
-# Check if a ruleset is configured.
-if($rulessettings{"RULES"}) {
-       # Call suricatactrl and setup the periodic update mechanism.
-       &IDS::call_suricatactrl("cron", $rulessettings{'AUTOUPDATE_INTERVAL'});
-}
-
 #
 ## Step 11: Start the IDS if enabled.
 #
 #
 ## Step 11: Start the IDS if enabled.
 #