summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/config.lib.inc
diff options
context:
space:
mode:
authorNOYB <Al_Stu@Frontier.com>2015-12-07 17:14:54 -0800
committerNOYB <Al_Stu@Frontier.com>2015-12-07 17:14:54 -0800
commit429e0911a0508ceb205be14e422ddf3793445a2c (patch)
treec878251b0126795a3f60e232fe428c0df5244c58 /src/etc/inc/config.lib.inc
parent874155f80004a64e3e6110011aad7e5f06044718 (diff)
downloadpfsense-429e0911a0508ceb205be14e422ddf3793445a2c.zip
pfsense-429e0911a0508ceb205be14e422ddf3793445a2c.tar.gz
Write Config Only Option
Add write_config function option to only write the config. Sometimes syncing firewall is not necessary or desirable. ex: changing log display options.
Diffstat (limited to 'src/etc/inc/config.lib.inc')
-rw-r--r--src/etc/inc/config.lib.inc8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/etc/inc/config.lib.inc b/src/etc/inc/config.lib.inc
index 0ea97b3..9eef685 100644
--- a/src/etc/inc/config.lib.inc
+++ b/src/etc/inc/config.lib.inc
@@ -515,7 +515,7 @@ function safe_write_file($file, $content, $force_binary) {
* null
******/
/* save the system configuration */
-function write_config($desc="Unknown", $backup = true) {
+function write_config($desc="Unknown", $backup = true, $write_config_only = false) {
global $config, $g;
if (!empty($_SERVER['REMOTE_ADDR'])) {
@@ -580,6 +580,12 @@ function write_config($desc="Unknown", $backup = true) {
unlock($lockkey);
+ if ($write_config_only) {
+ /* tell kernel to sync fs data */
+ conf_mount_ro();
+ return $config;
+ }
+
unlink_if_exists("/usr/local/pkg/pf/carp_sync_client.php");
/* tell kernel to sync fs data */
OpenPOWER on IntegriCloud