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

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