summaryrefslogtreecommitdiffstats
path: root/usr/local/www/diag_confbak.php
diff options
context:
space:
mode:
authorBill Marquette <billm@pfsense.org>2005-05-16 01:08:26 +0000
committerBill Marquette <billm@pfsense.org>2005-05-16 01:08:26 +0000
commit2f8d0729bec8dff7813558b59adcf71297097d89 (patch)
tree8dca62589fd0919de7546c3e2397eb8f50daf591 /usr/local/www/diag_confbak.php
parent96caa2a84e85554b7ea27cec06eb77a01d847320 (diff)
downloadpfsense-2f8d0729bec8dff7813558b59adcf71297097d89.zip
pfsense-2f8d0729bec8dff7813558b59adcf71297097d89.tar.gz
Enable config restore
Diffstat (limited to 'usr/local/www/diag_confbak.php')
-rwxr-xr-xusr/local/www/diag_confbak.php13
1 files changed, 13 insertions, 0 deletions
diff --git a/usr/local/www/diag_confbak.php b/usr/local/www/diag_confbak.php
index 5e39d7a..66ca599 100755
--- a/usr/local/www/diag_confbak.php
+++ b/usr/local/www/diag_confbak.php
@@ -28,6 +28,18 @@
POSSIBILITY OF SUCH DAMAGE.
*/
+
+if ($_GET['newver']) {
+ $conf_file = "/cf/conf/backup/config-${_GET['newver']}.xml";
+
+ if (config_install($conf_file) == 0) {
+ system_reboot();
+ $savemsg = "The configuration has been restored. The firewall is now rebooting.";
+ } else {
+ $input_errors[] = "The configuration could not be restored.";
+ }
+}
+
require("guiconfig.inc");
?>
@@ -44,6 +56,7 @@ require("guiconfig.inc");
include("fbegin.inc");
?>
<p class="pgtitle">Diagnostics: Local Restore</p>
+<?php if ($savemsg) print_info_box($savemsg); ?>
<br>
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<ul id="tabnav">
OpenPOWER on IntegriCloud