Sync back with m0n0wall. This method of saving is quicker than ours.

This commit is contained in:
Scott Ullrich 2006-06-10 22:10:21 +00:00
parent 8692fc2dbd
commit 4fa140817d

View File

@ -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;
}