c36ff1
From 0aba80bf749458960945acf106833b098c3c5c97 Mon Sep 17 00:00:00 2001
c36ff1
From: Emanuele Giuseppe Esposito <eesposit@redhat.com>
c36ff1
Date: Fri, 14 Jan 2022 16:50:44 +0100
c36ff1
Subject: [PATCH 4/5] Revert unnecesary lcase in ds-identify (#978)
c36ff1
c36ff1
RH-Author: Emanuele Giuseppe Esposito <eesposit@redhat.com>
c36ff1
RH-MergeRequest: 17: Datasource for VMware
c36ff1
RH-Commit: [4/5] 334aae223b966173238a905150cf7bc07829c255 (eesposit/cloud-init-centos-)
c36ff1
RH-Bugzilla: 2040090
c36ff1
RH-Acked-by: Miroslav Rezanina <mrezanin@redhat.com>
c36ff1
RH-Acked-by: Eduardo Otubo <otubo@redhat.com>
c36ff1
c36ff1
commit f516a7d37c1654addc02485e681b4358d7e7c0db
c36ff1
Author: Andrew Kutz <101085+akutz@users.noreply.github.com>
c36ff1
Date:   Fri Aug 13 14:30:55 2021 -0500
c36ff1
c36ff1
    Revert unnecesary lcase in ds-identify (#978)
c36ff1
c36ff1
    This patch reverts an unnecessary lcase optimization in the
c36ff1
    ds-identify script. SystemD documents the values produced by
c36ff1
    the systemd-detect-virt command are lower case, and the mapping
c36ff1
    table used by the FreeBSD check is also lower-case.
c36ff1
c36ff1
    The optimization added two new forked processes, needlessly
c36ff1
    causing overhead.
c36ff1
c36ff1
Signed-off-by: Emanuele Giuseppe Esposito <eesposit@redhat.com>
c36ff1
---
c36ff1
 tools/ds-identify | 2 +-
c36ff1
 1 file changed, 1 insertion(+), 1 deletion(-)
c36ff1
c36ff1
diff --git a/tools/ds-identify b/tools/ds-identify
c36ff1
index 0e12298f..7b782462 100755
c36ff1
--- a/tools/ds-identify
c36ff1
+++ b/tools/ds-identify
c36ff1
@@ -449,7 +449,7 @@ detect_virt() {
c36ff1
 read_virt() {
c36ff1
     cached "$DI_VIRT" && return 0
c36ff1
     detect_virt
c36ff1
-    DI_VIRT="$(echo "${_RET}" | tr '[:upper:]' '[:lower:]')"
c36ff1
+    DI_VIRT="${_RET}"
c36ff1
 }
c36ff1
 
c36ff1
 is_container() {
c36ff1
-- 
c36ff1
2.27.0
c36ff1