From d80e8a0eaa7668ae2b8bcb7259d1d3f7c99c933a Mon Sep 17 00:00:00 2001 From: Craig Comstock Date: Wed, 6 Sep 2023 08:12:14 -0500 Subject: [PATCH] Redirected all output when checking /sys/hypervisor/uuid with cat 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 38c4ff3072208bfd27cfda09dfdf0ad493408cfc) --- inventory/any.cf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/inventory/any.cf b/inventory/any.cf index 982c24164..58ca6a080 100644 --- a/inventory/any.cf +++ b/inventory/any.cf @@ -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::