Skip to content

Commit

Permalink
Redirected all output when checking /sys/hypervisor/uuid with cat
Browse files Browse the repository at this point in the history
This will only occur in pre 3.22.0 versions of CFEngine.

In 3.22.0 and after the isreadable() function is used.

Problem found with our no-noise-test showing the output of the uuid.

Ticket: ENT-9931
Changelog: none
(cherry picked from commit 38c4ff3)
  • Loading branch information
craigcomstock committed Sep 6, 2023
1 parent ea1d74d commit d80e8a0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion inventory/any.cf
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ bundle common cfe_autorun_inventory_aws
expression => isreadable("/sys/hypervisor/uuid", 1);
@else
"sys_hypervisor_uuid_readable" -> { "ENT-9931" }
expression => returnszero("${paths.cat} /sys/hypervisor/uuid 2>/dev/null", "useshell");
expression => returnszero("${paths.cat} /sys/hypervisor/uuid 2>&1 >/dev/null", "useshell");
@endif

!disable_inventory_aws.sys_hypervisor_uuid_readable::
Expand Down

0 comments on commit d80e8a0

Please sign in to comment.