summaryrefslogtreecommitdiffstats
path: root/usr
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2009-10-15 18:44:59 -0400
committerScott Ullrich <sullrich@pfsense.org>2009-10-15 18:44:59 -0400
commit91bfbd00e70b844645cbb10884ec1282cb2cf341 (patch)
treea3899ad40a2af0721aec7af2d087cbb4d78e70ef /usr
parentd5f5cf26af62467bdadba5be592e3ddbc6ac2df3 (diff)
downloadpfsense-91bfbd00e70b844645cbb10884ec1282cb2cf341.zip
pfsense-91bfbd00e70b844645cbb10884ec1282cb2cf341.tar.gz
Call conf_mount_rw() and ro where needed
Diffstat (limited to 'usr')
-rwxr-xr-xusr/local/www/diag_confbak.php4
1 files changed, 4 insertions, 0 deletions
diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php
index 2015c91..fc0871e 100755
--- a/usr/local/www/diag_confbak.php
+++ b/usr/local/www/diag_confbak.php
@@ -41,17 +41,21 @@
require("guiconfig.inc");
if($_GET['newver'] != "") {
+ conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
if(config_restore($g['conf_path'] . '/backup/config-' . $_GET['newver'] . '.xml') == 0)
$savemsg = "Successfully reverted to timestamp " . date("n/j/y H:i:s", $_GET['newver']) . " with description \"" . $confvers[$_GET['newver']]['description'] . "\".";
else
$savemsg = "Unable to revert to the selected configuration.";
+ conf_mount_ro();
}
if($_GET['rmver'] != "") {
+ conf_mount_rw();
$confvers = unserialize(file_get_contents($g['cf_conf_path'] . '/backup/backup.cache'));
unlink_if_exists($g['conf_path'] . '/backup/config-' . $_GET['rmver'] . '.xml');
$savemsg = "Deleted backup with timestamp " . date("n/j/y H:i:s", $_GET['rmver']) . " and description \"" . $confvers[$_GET['rmver']]['description'] . "\".";
+ conf_mount_ro();
}
cleanup_backupcache();
OpenPOWER on IntegriCloud