diff options
author | Chris Akritidis <43294513+cakrit@users.noreply.github.com> | 2021-02-01 10:04:56 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-01 10:04:56 -0800 |
commit | 56312d5cc55eba4ae5f5a7c4a07500c6223fe3d1 (patch) | |
tree | 58557e9585b61d4607172cb6bc287912bc293d56 | |
parent | 94dd1bcd348c6f4506b8f5d589016ac640dfae18 (diff) |
Fix container detection from systemd-detect-virt (#10569)
-rwxr-xr-x | daemon/system-info.sh | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh index 373680e7b2..80eb82f866 100755 --- a/daemon/system-info.sh +++ b/daemon/system-info.sh @@ -8,7 +8,10 @@ KERNEL_VERSION="$(uname -r)" ARCHITECTURE="$(uname -m)" # ------------------------------------------------------------------------------------------------- -# detect the virtualization +# detect the virtualization and possibly the container technology + +CONTAINER="unknown" +CONT_DETECTION="none" if [ -z "${VIRTUALIZATION}" ]; then VIRTUALIZATION="unknown" @@ -42,9 +45,6 @@ fi # ------------------------------------------------------------------------------------------------- # detect containers with heuristics -CONTAINER="unknown" -CONT_DETECTION="none" - if [ "${CONTAINER}" = "unknown" ]; then if [ -f /proc/1/sched ]; then IFS='(, ' read -r process _ < /proc/1/sched |