diff options
Diffstat (limited to 'etc/inc/config.inc')
-rw-r--r-- | etc/inc/config.inc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/etc/inc/config.inc b/etc/inc/config.inc index 11e6377..f38cfc1 100644 --- a/etc/inc/config.inc +++ b/etc/inc/config.inc @@ -86,6 +86,7 @@ if(file_exists("/cf/conf/config.xml")) { $fd = fopen("/cf/conf/config.xml", "w"); fwrite($fd, $config_contents); fclose($fd); + mwexec("sync"); conf_mount_ro(); } } @@ -295,6 +296,7 @@ function generate_config_cache($config) { $configcache = fopen($g['tmp_path'] . '/config.cache', "w"); fwrite($configcache, serialize($config)); fclose($configcache); + mwexec("sync"); conf_mount_ro(); config_unlock(); return true; @@ -317,6 +319,7 @@ function restore_backup($file) { unlink_if_exists("/tmp/config.cache"); log_error("pfSense is restoring the configuration $file"); file_notice("config.xml", "pfSense is restoring the configuration $file", "pfSenseConfigurator", ""); + mwexec("sync"); conf_mount_ro(); } config_unlock(); @@ -1071,6 +1074,7 @@ function write_config($desc="Unknown", $backup = true) { } if($g['booting'] <> true) { + mwexec("sync"); conf_mount_ro(); } @@ -1122,6 +1126,7 @@ function reset_factory_defaults() { /* call the wizard */ touch("/conf/trigger_initial_wizard"); + mwexec("sync"); conf_mount_ro(); config_unlock(); @@ -1142,6 +1147,7 @@ function config_restore($conffile) { $config = parse_config(true); write_config("Reverted to " . array_pop(explode("/", $conffile)) . ".", false); + mwexec("sync"); conf_mount_ro(); config_unlock(); @@ -1792,6 +1798,7 @@ function backup_config() { fwrite($bakout, serialize($backupcache)); fclose($bakout); + mwexec("sync"); conf_mount_ro(); return true; |