diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2009-10-15 18:44:59 -0400 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2009-10-15 18:44:59 -0400 |
commit | 91bfbd00e70b844645cbb10884ec1282cb2cf341 (patch) | |
tree | a3899ad40a2af0721aec7af2d087cbb4d78e70ef /usr/local/www/diag_confbak.php | |
parent | d5f5cf26af62467bdadba5be592e3ddbc6ac2df3 (diff) | |
download | pfsense-91bfbd00e70b844645cbb10884ec1282cb2cf341.zip pfsense-91bfbd00e70b844645cbb10884ec1282cb2cf341.tar.gz |
Call conf_mount_rw() and ro where needed
Diffstat (limited to 'usr/local/www/diag_confbak.php')
-rwxr-xr-x | usr/local/www/diag_confbak.php | 4 |
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(); |