aboutsummaryrefslogtreecommitdiffstats
path: root/config/suricata
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-09-04 17:50:05 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-09-04 17:50:05 -0400
commit9d85e3d4ced9edbb9233a7df8e28b14ef0b00eae (patch)
tree40ce05747ee53ae18931d48dda9711206c9989f7 /config/suricata
parent5810a967278f80a4f54cb3313f31acdaf3fa906b (diff)
downloadpfsense-packages-9d85e3d4ced9edbb9233a7df8e28b14ef0b00eae.tar.gz
pfsense-packages-9d85e3d4ced9edbb9233a7df8e28b14ef0b00eae.tar.bz2
pfsense-packages-9d85e3d4ced9edbb9233a7df8e28b14ef0b00eae.zip
Default "forcekeepsettings" to 'on' for new installs (Issue #3838)
Diffstat (limited to 'config/suricata')
-rw-r--r--config/suricata/suricata_post_install.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/config/suricata/suricata_post_install.php b/config/suricata/suricata_post_install.php
index 3c362055..4ee50946 100644
--- a/config/suricata/suricata_post_install.php
+++ b/config/suricata/suricata_post_install.php
@@ -117,7 +117,7 @@ safe_mkdir(IPREP_PATH);
if (!file_exists(SURICATADIR . "rules/dns-events.rules"))
@copy("/usr/local/pkg/suricata/dns-events.rules", SURICATADIR . "rules/dns-events.rules");
-// remake saved settings
+// remake saved settings if previously flagged
if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] == 'on') {
log_error(gettext("[Suricata] Saved settings detected... rebuilding installation with saved settings..."));
update_status(gettext("Saved settings detected..."));
@@ -194,6 +194,11 @@ if ($config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] =
}
}
+// If this is first install and "forcekeepsettings" is empty,
+// then default it to 'on'.
+if (empty($config['installedpackages']['suricata']['config'][0]['forcekeepsettings']))
+ $config['installedpackages']['suricata']['config'][0]['forcekeepsettings'] = 'on';
+
// Finished with file system mods, so remount it read-only
conf_mount_ro();