aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-10-15 14:54:42 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-10-15 14:54:53 -0400
commit35027c776834e747460e8fb0a1db478aabe44a56 (patch)
tree66036d41e9796824bd4fb28299b048824763a5c4
parent196610ae4ce93843d877993c6f1a400c7670df1e (diff)
downloadpfsense-packages-35027c776834e747460e8fb0a1db478aabe44a56.tar.gz
pfsense-packages-35027c776834e747460e8fb0a1db478aabe44a56.tar.bz2
pfsense-packages-35027c776834e747460e8fb0a1db478aabe44a56.zip
Call conf_mount_rw() before restore
-rw-r--r--config/autoconfigbackup/autoconfigbackup.php4
1 files changed, 3 insertions, 1 deletions
diff --git a/config/autoconfigbackup/autoconfigbackup.php b/config/autoconfigbackup/autoconfigbackup.php
index f0c5741d..e43620c4 100644
--- a/config/autoconfigbackup/autoconfigbackup.php
+++ b/config/autoconfigbackup/autoconfigbackup.php
@@ -221,6 +221,7 @@ function get_hostnames() {
curl_close($curl_session);
}
if(!$input_errors && $data) {
+ conf_mount_rw();
if(config_restore("/tmp/config_restore.xml") == 0) {
$savemsg = "Successfully reverted the pfSense configuration to revision " . urldecode($_REQUEST['newver']) . ".";
$savemsg .= <<<EOF
@@ -238,7 +239,8 @@ EOF;
} else {
log_error("There was an error when restoring the AutoConfigBackup item");
}
- //unlink("/tmp/config_restore.xml");
+ unlink_if_exists("/tmp/config_restore.xml");
+ conf_mount_ro();
}
if($_REQUEST['download']) {
// Phone home and obtain backups