git.annexia.org
/
virt-what.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1bd3ea5
)
Rearrange lxc test to avoid use of cat
author
Richard W.M. Jones
<rjones@redhat.com>
Thu, 22 Dec 2022 10:31:47 +0000
(10:31 +0000)
committer
Richard W.M. Jones
<rjones@redhat.com>
Thu, 22 Dec 2022 10:31:47 +0000
(10:31 +0000)
Thanks: Elias Probst <e.probst@ssc-services.de>
virt-what.in
patch
|
blob
|
history
diff --git
a/virt-what.in
b/virt-what.in
index
d090898
..
170bc24
100644
(file)
--- a/
virt-what.in
+++ b/
virt-what.in
@@
-175,7
+175,8
@@
fi
# Added by Marc Fournier
if [ -e "${root}/proc/1/environ" ] &&
- cat "${root}/proc/1/environ" | tr '\000' '\n' | grep -Eiq '^container=lxc'; then
+ tr '\000' '\n' < "${root}/proc/1/environ" |
+ grep -Eiq '^container=lxc'; then
echo lxc
fi