summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorErmal LUÇI <eri@pfsense.org>2015-06-11 03:46:48 +0200
committerErmal LUÇI <eri@pfsense.org>2015-06-11 03:46:48 +0200
commit2e7ea1074a3c75a7f56287af1f7b283721f1ceb5 (patch)
tree85077d8e80292424a633021285631a93b627e979 /etc/inc
parent894d01b6f439cb0aa4d45b94da1c412cf83576e0 (diff)
downloadpfsense-2e7ea1074a3c75a7f56287af1f7b283721f1ceb5.zip
pfsense-2e7ea1074a3c75a7f56287af1f7b283721f1ceb5.tar.gz
Make the host uuid opt-out
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/pfsense-utils.inc13
-rw-r--r--etc/inc/pkg-utils.inc1
2 files changed, 10 insertions, 4 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 15c7faa..cb2f573 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -1686,7 +1686,10 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
- curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version") . ' : ' . get_single_sysctl('kern.hostuuid')));
+ if (!isset($config['system']['host_uuid']))
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version") . ' : ' . get_single_sysctl('kern.hostuuid')));
+ else
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version")));
if (!empty($config['system']['proxyurl'])) {
curl_setopt($ch, CURLOPT_PROXY, $config['system']['proxyurl']);
@@ -1706,7 +1709,8 @@ function download_file($url, $destination, $verify_ssl = false, $connect_timeout
}
function download_file_with_progress_bar($url_file, $destination_file, $readbody = 'read_body', $connect_timeout = 5, $timeout=0) {
- global $ch, $fout, $file_size, $downloaded, $config, $first_progress_update, $g;
+ global $config, $g;
+ global $ch, $fout, $file_size, $downloaded, $config, $first_progress_update;
$file_size = 1;
$downloaded = 1;
$first_progress_update = TRUE;
@@ -1728,7 +1732,10 @@ function download_file_with_progress_bar($url_file, $destination_file, $readbody
curl_setopt($ch, CURLOPT_NOPROGRESS, '1');
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
- curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version") . ' : ' . get_single_sysctl('kern.hostuuid')));
+ if (!isset($config['system']['host_uuid']))
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version") . ' : ' . get_single_sysctl('kern.hostuuid')));
+ else
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version")));
if (!empty($config['system']['proxyurl'])) {
curl_setopt($ch, CURLOPT_PROXY, $config['system']['proxyurl']);
diff --git a/etc/inc/pkg-utils.inc b/etc/inc/pkg-utils.inc
index e16dc02..964f2f4 100644
--- a/etc/inc/pkg-utils.inc
+++ b/etc/inc/pkg-utils.inc
@@ -179,7 +179,6 @@ function get_pkg_info($pkgs = 'all', $info = 'all') {
$params = array(
"pkg" => $pkgs,
"info" => $info,
- "uuid" => get_single_sysctl('kern.hostuuid'),
"freebsd_version" => get_freebsd_version(),
"freebsd_machine" => $freebsd_machine
);
OpenPOWER on IntegriCloud