aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2008-10-08 19:43:49 +0000
committerScott Ullrich <sullrich@pfsense.org>2008-10-08 19:43:49 +0000
commitddb450fb10e7105841020a5b9878dd1ac855fdc8 (patch)
tree2067ff5465c964abaf0e28b98ddc8ef6169e19f6 /packages
parent3ecefca65b76270986ae34d54263eb10fc8774d3 (diff)
downloadpfsense-packages-ddb450fb10e7105841020a5b9878dd1ac855fdc8.tar.gz
pfsense-packages-ddb450fb10e7105841020a5b9878dd1ac855fdc8.tar.bz2
pfsense-packages-ddb450fb10e7105841020a5b9878dd1ac855fdc8.zip
Hostname is required for restore operations
Diffstat (limited to 'packages')
-rw-r--r--packages/autoconfigbackup/autoconfigbackup.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/packages/autoconfigbackup/autoconfigbackup.php b/packages/autoconfigbackup/autoconfigbackup.php
index b75bf4d8..56578e2f 100644
--- a/packages/autoconfigbackup/autoconfigbackup.php
+++ b/packages/autoconfigbackup/autoconfigbackup.php
@@ -63,7 +63,9 @@ if(!$username) {
if($_REQUEST['newver'] != "") {
// Phone home and obtain backups
$curl_session = curl_init();
- curl_setopt($curl_session, CURLOPT_URL, $get_url . "?action=restore&revision=" . urlencode($_REQUEST['newver']));
+ curl_setopt($curl_session, CURLOPT_URL, $get_url . "?action=restore" .
+ "&hostname=" . urlencode($_REQUEST['newver']) .
+ " &revision=" . urlencode($_REQUEST['newver']));
curl_setopt($curl_session, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($curl_session, CURLOPT_RETURNTRANSFER, 1);
$data = curl_exec($curl_session);
@@ -75,7 +77,7 @@ if($_REQUEST['newver'] != "") {
fclose($fd);
if (curl_errno($curl_session)) {
$fd = fopen("/tmp/backupdebug.txt", "w");
- fwrite($fd, $get_url . "" . "action=restore&revision=" . urlencode($_REQUEST['newver']) . "\n\n");
+ fwrite($fd, $get_url . "" . "action=restore&hostname={$hostname}&revision=" . urlencode($_REQUEST['newver']) . "\n\n");
fwrite($fd, $data);
fwrite($fd, curl_error($curl_session));
fclose($fd);