make.sh: Ensure that we enter the chroot only in our own NS

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2024-07-04 17:07:41 +00:00
parent d630cfec5b
commit 99ce7cd2ce

View File

@@ -494,6 +494,11 @@ enterchroot() {
local PATH="${TOOLS_DIR}/ccache/bin:/bin:/usr/bin:/sbin:/usr/sbin:${TOOLS_DIR}/sbin:${TOOLS_DIR}/bin"
# Check if we are running in our namespace
if [ -z "${IN_NAMESPACE}" ]; then
exiterror "Not running in namespace"
fi
# Prepend any custom changes to PATH
if [ -n "${CUSTOM_PATH}" ]; then
PATH="${CUSTOM_PATH}:${PATH}"