Rearrange lxc test to avoid use of cat
[virt-what.git] / virt-what.in
index d090898..170bc24 100644 (file)
@@ -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