aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-10 15:56:18 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-12-15 12:11:57 -0500
commit34e19f4b7ffe46ddba00b9fcc2c1de062ffc047b (patch)
tree5177da764cb6973d6b244f6d059483e42e56aa0d
parent8dcd6625ce0f4eeb34f1eac94d53ef5cb2c6cbe8 (diff)
downloadpfsense-packages-34e19f4b7ffe46ddba00b9fcc2c1de062ffc047b.tar.gz
pfsense-packages-34e19f4b7ffe46ddba00b9fcc2c1de062ffc047b.tar.bz2
pfsense-packages-34e19f4b7ffe46ddba00b9fcc2c1de062ffc047b.zip
Remove conf_mount_rw() calls from sync_suricata_package_config() function.
-rw-r--r--config/suricata/suricata.inc9
1 files changed, 3 insertions, 6 deletions
diff --git a/config/suricata/suricata.inc b/config/suricata/suricata.inc
index 7110dc5b..aaae25ce 100644
--- a/config/suricata/suricata.inc
+++ b/config/suricata/suricata.inc
@@ -809,12 +809,9 @@ function sync_suricata_package_config() {
$suricatadir = SURICATADIR;
$rcdir = RCFILEPREFIX;
- conf_mount_rw();
-
// Do not start config build if there are no Suricata-configured interfaces
- if (!is_array($config['installedpackages']['suricata']) || !is_array($config['installedpackages']['suricata']['rule'])) {
+ if (!is_array($config['installedpackages']['suricata']['rule']) || count($config['installedpackages']['suricata']['rule']) < 1) {
unlink_if_exists("{$rcdir}suricata.sh");
- conf_mount_ro();
return;
}
@@ -845,8 +842,6 @@ function sync_suricata_package_config() {
// Do not attempt package sync if reinstalling package or booting
if (!isset($g['suricata_postinstall']) && !$g['booting'])
suricata_sync_on_changes();
-
- conf_mount_ro();
}
function suricata_load_suppress_sigs($suricatacfg, $track_by=false) {
@@ -3472,7 +3467,9 @@ function suricata_do_xmlrpc_sync($syncdownloadrules, $sync_to_ip, $port, $userna
unset(\$g["suricata_postinstall"]);
log_error(gettext("[suricata] XMLRPC pkg CARP sync: Generating suricata.yaml file using Master Host settings..."));
\$rebuild_rules = true;
+ conf_mount_rw();
sync_suricata_package_config();
+ conf_mount_ro();
\$rebuild_rules = false;
{$suricatastart}
log_error(gettext("[suricata] XMLRPC pkg CARP sync process on this host is complete..."));