mirror of
https://github.com/pfsense/pfsense.git
synced 2025-10-26 11:38:35 +00:00
Sync back with m0n0wall. This method of saving is quicker than ours.
This commit is contained in:
parent
8692fc2dbd
commit
4fa140817d
@ -845,8 +845,19 @@ function write_config($desc="Unknown", $backup = true) {
|
||||
|
||||
config_unlock();
|
||||
|
||||
// Always reparse the config after it's written - something is getting lost in serialize().
|
||||
$config = parse_config(true);
|
||||
/* re-read configuration */
|
||||
$config = parse_xml_config("{$g['conf_path']}/config.xml", $g['xml_rootobj']);
|
||||
|
||||
/* write config cache */
|
||||
$fd = @fopen("{$g['tmp_path']}/config.cache", "wb");
|
||||
if ($fd) {
|
||||
fwrite($fd, serialize($config));
|
||||
fclose($fd);
|
||||
}
|
||||
|
||||
/* tell kernel to sync fs data */
|
||||
mwexec("/bin/sync");
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user