sailesh1993 / rpms / cloud-init

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