Skip to content

Commit

Permalink
add freebsd jail detection to system-info.sh (netdata#16858)
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyam8 authored Jan 29, 2024
1 parent 9d99984 commit b7e670e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion daemon/system-info.sh
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ if [ -z "${VIRTUALIZATION}" ]; then
VIRTUALIZATION="unknown"
VIRT_DETECTION="none"
elif [ "$VIRTUALIZATION" != "none" ] && [ "$VIRTUALIZATION" != "unknown" ]; then
VIRTUALIZATION=$(virtualization_normalize_name $VIRTUALIZATION)
VIRTUALIZATION=$(virtualization_normalize_name "$VIRTUALIZATION")
fi
else
# Passed from outside - probably in docker run
Expand Down Expand Up @@ -101,6 +101,10 @@ if [ "${CONTAINER}" = "unknown" ]; then
CONT_DETECTION="kubernetes"
fi

if [ "${KERNEL_NAME}" = FreeBSD ] && command -v sysctl && sysctl security.jail.jailed 2>/dev/null | grep -q "1$"; then
CONTAINER="jail"
CONT_DETECTION="sysctl"
fi
fi

# -------------------------------------------------------------------------------------------------
Expand Down

0 comments on commit b7e670e

Please sign in to comment.