summaryrefslogtreecommitdiffstats
path: root/etc/inc/pfsense-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'etc/inc/pfsense-utils.inc')
-rw-r--r--etc/inc/pfsense-utils.inc12
1 files changed, 6 insertions, 6 deletions
diff --git a/etc/inc/pfsense-utils.inc b/etc/inc/pfsense-utils.inc
index 22b0be0..93719ad 100644
--- a/etc/inc/pfsense-utils.inc
+++ b/etc/inc/pfsense-utils.inc
@@ -802,7 +802,7 @@ function check_firmware_version($tocheck = "all", $return_php = true) {
}
$version = php_uname('r');
$version = explode('-', $version);
- $rawparams = array("firmware" => array("version" => trim(file_get_contents('/etc/version'))),
+ $rawparams = array("firmware" => array("version" => $g['product_version']),
"kernel" => array("version" => $version[0]),
"base" => array("version" => $version[0]),
"platform" => trim(file_get_contents('/etc/platform')),
@@ -841,7 +841,7 @@ function host_firmware_version($tocheck = "") {
$os_version = trim(substr(php_uname("r"), 0, strpos(php_uname("r"), '-')));
return array(
- "firmware" => array("version" => trim(file_get_contents('/etc/version', " \n"))),
+ "firmware" => array("version" => $g['product_version']),
"kernel" => array("version" => $os_version),
"base" => array("version" => $os_version),
"platform" => trim(file_get_contents('/etc/platform', " \n")),
@@ -1773,9 +1773,9 @@ function download_file($url, $destination, $verify_ssl = true, $connect_timeout
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
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')));
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ' : ' . get_single_sysctl('kern.hostuuid'));
} else {
- curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version")));
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
}
if (!empty($config['system']['proxyurl'])) {
@@ -1819,9 +1819,9 @@ function download_file_with_progress_bar($url_file, $destination_file, $readbody
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $connect_timeout);
curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
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')));
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version'] . ' : ' . get_single_sysctl('kern.hostuuid'));
} else {
- curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . rtrim(file_get_contents("/etc/version")));
+ curl_setopt($ch, CURLOPT_USERAGENT, $g['product_name'] . '/' . $g['product_version']);
}
if (!empty($config['system']['proxyurl'])) {
OpenPOWER on IntegriCloud