diff options
author | Renato Botelho <renato@netgate.com> | 2015-12-11 07:28:51 -0200 |
---|---|---|
committer | Renato Botelho <renato@netgate.com> | 2015-12-11 07:28:51 -0200 |
commit | 59b75375c83bf56cee58295b2ee755343a83c418 (patch) | |
tree | 735b56ff2e1d9bac78a57ed1cd5754d92dd9e1f1 | |
parent | 7365d0f97d5690b4f8da43982459c3be582fa2f5 (diff) | |
parent | 429e0911a0508ceb205be14e422ddf3793445a2c (diff) | |
download | pfsense-59b75375c83bf56cee58295b2ee755343a83c418.zip pfsense-59b75375c83bf56cee58295b2ee755343a83c418.tar.gz |
Merge pull request #2182 from NOYB/write_config_only_option
-rw-r--r-- | src/etc/inc/config.lib.inc | 8 |
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 */ |