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

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