Blame SOURCES/0001-Rearrange-lxc-test-to-avoid-use-of-cat.patch

4244f0
From a29d4a5632ff9f60f939e4f0f36ce97ed43c5650 Mon Sep 17 00:00:00 2001
4244f0
From: "Richard W.M. Jones" <rjones@redhat.com>
4244f0
Date: Thu, 22 Dec 2022 10:31:47 +0000
4244f0
Subject: [PATCH] Rearrange lxc test to avoid use of cat
4244f0
4244f0
Thanks: Elias Probst <e.probst@ssc-services.de>
4244f0
---
4244f0
 virt-what.in | 3 ++-
4244f0
 1 file changed, 2 insertions(+), 1 deletion(-)
4244f0
4244f0
diff --git a/virt-what.in b/virt-what.in
4244f0
index d090898e5..170bc24ab 100644
4244f0
--- a/virt-what.in
4244f0
+++ b/virt-what.in
4244f0
@@ -175,7 +175,8 @@ fi
4244f0
 # Added by Marc Fournier
4244f0
 
4244f0
 if [ -e "${root}/proc/1/environ" ] &&
4244f0
-    cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=lxc'; then
4244f0
+    tr '\000' '\n' < "${root}/proc/1/environ" |
4244f0
+        grep -Eiq '^container=lxc'; then
4244f0
     echo lxc
4244f0
 fi
4244f0
 
4244f0
-- 
4244f0
2.31.1
4244f0