diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-12-07 20:49:33 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-12-07 20:49:33 +0000 |
commit | df1e2be39f89e73620efe0ad2a898dfe70b1ea44 (patch) | |
tree | 3a8877012d7b642891c9db0def4b739639a2f9e5 /packages/autoconfigbackup/autoconfigbackup_backup.php | |
parent | 91dd1eee2291679c17ea46b9b5593ce04a2c6ed1 (diff) | |
download | pfsense-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()
Diffstat (limited to 'packages/autoconfigbackup/autoconfigbackup_backup.php')
-rw-r--r-- | packages/autoconfigbackup/autoconfigbackup_backup.php | 10 |
1 files changed, 5 insertions, 5 deletions
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(); |