fix: container virtualization detection with systemd-detect-virt (#12338)
Ilya Mashchenko committed
Mar 8, 2022 at 09:57 UTC
797c74da15e3a3ff3019ebd61ecc5192ca8c478f
1 file changed
+1
-1
daemon/system-info.sh
+1
-1
@@ -21,7 +21,7 @@ if [ -z "${VIRTUALIZATION}" ]; then
21
if [ -n "$(command -v systemd-detect-virt 2> /dev/null)" ]; then
22
VIRTUALIZATION="$(systemd-detect-virt -v)"
23
VIRT_DETECTION="systemd-detect-virt"
24
- CONTAINER="$(systemd-detect-virt -c)"
24
+ CONTAINER=${CONTAINER:-$(systemd-detect-virt -c)}
25
CONT_DETECTION="systemd-detect-virt"
26
else
27
if grep -q "^flags.*hypervisor" /proc/cpuinfo 2> /dev/null; then