summaryrefslogtreecommitdiffstats
path: root/src/etc/inc/pkg-utils.inc
diff options
context:
space:
mode:
Diffstat (limited to 'src/etc/inc/pkg-utils.inc')
-rw-r--r--src/etc/inc/pkg-utils.inc15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/etc/inc/pkg-utils.inc b/src/etc/inc/pkg-utils.inc
index a7e51f5..e342d94 100644
--- a/src/etc/inc/pkg-utils.inc
+++ b/src/etc/inc/pkg-utils.inc
@@ -77,6 +77,11 @@ function pkg_update($force = false) {
function pkg_env($extra_env = array()) {
global $config, $g;
+ $user_agent = $g['product_name'] . '/' . $g['product_version'];
+ if (!isset($config['system']['do_not_send_uniqueid'])) {
+ $user_agent .= ':' . system_get_uniqueid();
+ }
+
$pkg_env_vars = array(
"LANG" => "C",
"HTTP_USER_AGENT" => $user_agent,
@@ -117,11 +122,6 @@ function pkg_call($params, $mute = false, $extra_env = array()) {
return false;
}
- $user_agent = $g['product_name'] . '/' . $g['product_version'];
- if (!isset($config['system']['do_not_send_host_uuid'])) {
- $user_agent .= ' : ' . get_single_sysctl('kern.hostuuid');
- }
-
$descriptorspec = array(
1 => array("pipe", "w"), /* stdout */
2 => array("pipe", "w") /* stderr */
@@ -199,11 +199,6 @@ function pkg_exec($params, &$stdout, &$stderr, $extra_env = array()) {
return -1;
}
- $user_agent = $g['product_name'] . '/' . $g['product_version'];
- if (!isset($config['system']['do_not_send_host_uuid'])) {
- $user_agent .= ' : ' . get_single_sysctl('kern.hostuuid');
- }
-
$descriptorspec = array(
1 => array("pipe", "w"), /* stdout */
2 => array("pipe", "w") /* stderr */
OpenPOWER on IntegriCloud