@cryptotaxi247 / netdata-1 / commits / 56312d5cc

Fix container detection from systemd-detect-virt (#10569)

Chris Akritidis committed Feb 1, 2021 at 10:04 UTC 56312d5cc55eba4ae5f5a7c4a07500c6223fe3d1
1 file changed +4 -4
daemon/system-info.sh
+4 -4
@@ -8,7 +8,10 @@ KERNEL_VERSION="$(uname -r)"
8 ARCHITECTURE="$(uname -m)"
9
10 # -------------------------------------------------------------------------------------------------
11 -# detect the virtualization
11 +# detect the virtualization and possibly the container technology
12 +
13 +CONTAINER="unknown"
14 +CONT_DETECTION="none"
15
16 if [ -z "${VIRTUALIZATION}" ]; then
17 VIRTUALIZATION="unknown"
@@ -42,9 +45,6 @@ fi
45 # -------------------------------------------------------------------------------------------------
46 # detect containers with heuristics
47
45 -CONTAINER="unknown"
46 -CONT_DETECTION="none"
47 -
48 if [ "${CONTAINER}" = "unknown" ]; then
49 if [ -f /proc/1/sched ]; then
50 IFS='(, ' read -r process _ < /proc/1/sched