aboutsummaryrefslogtreecommitdiffstats
path: root/config/snort
diff options
context:
space:
mode:
authorbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 15:20:41 -0400
committerbmeeks8 <bmeeks8@bellsouth.net>2014-10-09 15:20:41 -0400
commitbe4a5f3215490c634ad1b3f6980e7ee4a308f7a3 (patch)
tree2f8ae1e34bf18dd464454d42f41d3c18901c3f21 /config/snort
parentae6a24bebebb1ca8675787cb7fff74e5b4a802d5 (diff)
downloadpfsense-packages-be4a5f3215490c634ad1b3f6980e7ee4a308f7a3.tar.gz
pfsense-packages-be4a5f3215490c634ad1b3f6980e7ee4a308f7a3.tar.bz2
pfsense-packages-be4a5f3215490c634ad1b3f6980e7ee4a308f7a3.zip
Check in post-install and only change filesystem to RW if necessary.
Diffstat (limited to 'config/snort')
-rw-r--r--config/snort/snort_post_install.php13
1 files changed, 9 insertions, 4 deletions
diff --git a/config/snort/snort_post_install.php b/config/snort/snort_post_install.php
index 718d6bce..8d1588d9 100644
--- a/config/snort/snort_post_install.php
+++ b/config/snort/snort_post_install.php
@@ -73,6 +73,7 @@ $snortlibdir = SNORTLIBDIR;
$rcdir = RCFILEPREFIX;
$flowbit_rules_file = FLOWBITS_FILENAME;
$snort_enforcing_rules_file = SNORT_ENFORCING_RULES_FILENAME;
+$mounted_rw = FALSE;
/* Hard kill any running Snort processes that may have been started by any */
/* of the pfSense scripts such as check_reload_status() or rc.start_packages */
@@ -93,8 +94,11 @@ if(is_process_running("barnyard")) {
/* Set flag for post-install in progress */
$g['snort_postinstall'] = true;
-/* Set Snort conf partition to read-write so we can make changes there */
-conf_mount_rw();
+/* If not already, set Snort conf partition to read-write so we can make changes there */
+if (!is_subsystem_dirty('mount')) {
+ conf_mount_rw();
+ $mounted_rw = TRUE;
+}
/* cleanup default files */
@rename("{$snortdir}/snort.conf-sample", "{$snortdir}/snort.conf");
@@ -255,8 +259,9 @@ if ($config['installedpackages']['snortglobal']['forcekeepsettings'] == 'on') {
}
}
-/* We're finished with conf partition mods, return to read-only */
-conf_mount_ro();
+/* We're finished with conf partition mods, return to read-only if we changed it */
+if ($mounted_rw == TRUE)
+ conf_mount_ro();
/* If an existing Snort Dashboard Widget container is not found, */
/* then insert our default Widget Dashboard container. */