diff options
author | Ermal Luçi <eri@pfsense.org> | 2009-12-28 14:56:49 +0000 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2009-12-28 14:56:49 +0000 |
commit | 42739c1c251abc90a43bb19baba7b0576308e432 (patch) | |
tree | bb4e531542d98fa794a31e8206be0bd2b4ec660e | |
parent | 6955830f96ee6f3912a89e271eb59e501dfe3514 (diff) | |
download | pfsense-42739c1c251abc90a43bb19baba7b0576308e432.zip pfsense-42739c1c251abc90a43bb19baba7b0576308e432.tar.gz |
Be consistent where we write and where we read the new config.
-rw-r--r-- | etc/inc/config.lib.inc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/etc/inc/config.lib.inc b/etc/inc/config.lib.inc index ab4e339..0bb1e61 100644 --- a/etc/inc/config.lib.inc +++ b/etc/inc/config.lib.inc @@ -444,7 +444,7 @@ function write_config($desc="Unknown", $backup = true) { $changetime = time(); /* Log the running script so it's not entirely unlogged what changed */ - if ($desc == "Unknown") + if ($desc == "Unknown") $desc = "{$_SERVER['SCRIPT_NAME']} made unknown change"; $config['revision']['description'] = $desc; @@ -458,7 +458,7 @@ function write_config($desc="Unknown", $backup = true) { conf_mount_rw(); /* write new configuration */ - $fd = fopen("{$g['cf_conf_path']}/config.xml", "w"); + $fd = fopen("{$g['conf_path']}/config.xml", "w"); if (!$fd) { // Unable to open temporary file for writing log_error("WARNING: Config contents could not be save. Could not open file!"); @@ -493,6 +493,7 @@ function write_config($desc="Unknown", $backup = true) { /* tell kernel to sync fs data */ if (!$g['booting']) conf_mount_ro(); + unlock($lockkey); unlink_if_exists("/usr/local/pkg/pf/carp_sync_client.php"); @@ -1253,4 +1254,4 @@ function set_device_perms() { } } -?>
\ No newline at end of file +?> |