aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-12-07 20:49:33 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-12-07 20:49:33 +0000
commitdf1e2be39f89e73620efe0ad2a898dfe70b1ea44 (patch)
tree3a8877012d7b642891c9db0def4b739639a2f9e5
parent91dd1eee2291679c17ea46b9b5593ce04a2c6ed1 (diff)
downloadpfsense-packages-df1e2be39f89e73620efe0ad2a898dfe70b1ea44.tar.gz
pfsense-packages-df1e2be39f89e73620efe0ad2a898dfe70b1ea44.tar.bz2
pfsense-packages-df1e2be39f89e73620efe0ad2a898dfe70b1ea44.zip
* Handle nooverwrite correctly
* Do not use filter_configure() to backup, call upload_config()
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.php9
-rw-r--r--packages/autoconfigbackup/autoconfigbackup_backup.php10
2 files changed, 8 insertions, 11 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php
index 1c3d4265..3bb154fc 100644
--- a/packages/autoconfigbackup/autoconfigbackup.php
+++ b/packages/autoconfigbackup/autoconfigbackup.php
@@ -84,9 +84,7 @@ include("head.inc");
}
if ($input_errors)
print_input_errors($input_errors);
-
?>
-
<table width="100%" border="0" cellpadding="0" cellspacing="0"> <tr><td>
<div id='feedbackdiv'></div>
<?php
@@ -108,8 +106,8 @@ include("head.inc");
<table id="backuptable" class="tabcont" align="center" width="100%" border="0" cellpadding="6" cellspacing="0">
<tr>
<td colspan="2" align="left">
- <div id='loading'>
- <img src='themes/metallic/images/misc/loader.gif'> Loading, please wait...
+ <div id="loading">
+ <img src="themes/metallic/images/misc/loader.gif"> Loading, please wait...
</div>
<?php
if($_REQUEST['rmver'] != "") {
@@ -184,7 +182,6 @@ include("head.inc");
<input name="Submit" type="submit" class="formbtn" value=" No ">
</form>
EOF;
-
} else {
$savemsg = "Unable to revert to the selected configuration.";
}
@@ -326,4 +323,4 @@ EOF;
</form>
<?php include("fend.inc"); ?>
</body>
-</html>
+</html> \ No newline at end of file
diff --git a/packages/autoconfigbackup/autoconfigbackup_backup.php b/packages/autoconfigbackup/autoconfigbackup_backup.php
index 4c51ec05..7617f688 100644
--- a/packages/autoconfigbackup/autoconfigbackup_backup.php
+++ b/packages/autoconfigbackup/autoconfigbackup_backup.php
@@ -27,7 +27,9 @@
POSSIBILITY OF SUCH DAMAGE.
*/
+require("globals.inc");
require("guiconfig.inc");
+require("/usr/local/pkg/autoconfigbackup.inc");
$pfSversion = str_replace("\n", "", file_get_contents("/etc/version"));
if(strstr($pfSversion, "1.2"))
@@ -60,11 +62,9 @@ if(!$username) {
}
if($_POST) {
- touch("/tmp/acb_nooverwrite");
- if($_REQUEST['reason'])
- write_config($_REQUEST['reason']);
- else
- write_config("Backup invoked via Auto Config Backup.");
+ if($_REQUEST['nooverwrite'])
+ touch("/tmp/acb_nooverwrite");
+ upload_config();
$savemsg = "Backup completed successfully.";
exec("echo > /cf/conf/lastpfSbackup.txt");
filter_configure_sync();