summaryrefslogtreecommitdiffstats
path: root/daemon/system-info.sh
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2022-11-30 18:47:05 +0000
commit97e01009d69b8fbebfebf68f51e3d126d0ed43fc (patch)
tree02e8b836c3a9d89806f3e67d4a5fe9f52dbb0061 /daemon/system-info.sh
parentReleasing debian version 1.36.1-1. (diff)
downloadnetdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.tar.xz
netdata-97e01009d69b8fbebfebf68f51e3d126d0ed43fc.zip
Merging upstream version 1.37.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'daemon/system-info.sh')
-rwxr-xr-xdaemon/system-info.sh3
1 files changed, 2 insertions, 1 deletions
diff --git a/daemon/system-info.sh b/daemon/system-info.sh
index 101ccb0bf..68cdc4812 100755
--- a/daemon/system-info.sh
+++ b/daemon/system-info.sh
@@ -33,7 +33,8 @@ if [ -z "${VIRTUALIZATION}" ]; then
if command -v systemd-detect-virt >/dev/null 2>&1; then
VIRTUALIZATION="$(systemd-detect-virt -v)"
VIRT_DETECTION="systemd-detect-virt"
- CONTAINER=${CONTAINER:-$(systemd-detect-virt -c)}
+ CONTAINER_DETECT_TMP="$(systemd-detect-virt -c)"
+ [ -n "$CONTAINER_DETECT_TMP" ] && CONTAINER="$CONTAINER_DETECT_TMP"
CONT_DETECTION="systemd-detect-virt"
elif command -v lscpu >/dev/null 2>&1; then
VIRTUALIZATION=$(lscpu | grep "Hypervisor vendor:" | cut -d: -f 2 | awk '{$1=$1};1')