From 514d8bacc30ba7ed3575ee5ac34baa242e6c9500 Mon Sep 17 00:00:00 2001 From: Leonardo Di Donato Date: Fri, 8 Nov 2019 11:31:13 +0000 Subject: [PATCH] update(docker): introduce SKIP_MODULE_LOAD env variable Co-authored-by: Lorenzo Fontana Signed-off-by: Leonardo Di Donato --- docker/dev/docker-entrypoint.sh | 8 +++----- docker/local/docker-entrypoint.sh | 8 +++----- docker/rhel/docker-entrypoint.sh | 8 +++----- docker/stable/docker-entrypoint.sh | 8 +++----- scripts/falco-probe-loader | 1 + 5 files changed, 13 insertions(+), 20 deletions(-) diff --git a/docker/dev/docker-entrypoint.sh b/docker/dev/docker-entrypoint.sh index fe0687e6..082abc00 100755 --- a/docker/dev/docker-entrypoint.sh +++ b/docker/dev/docker-entrypoint.sh @@ -18,16 +18,14 @@ # set -e -# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module +# Set the SKIP_MODULE_LOAD variable to skip loading the kernel module -if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then +if [[ -z "${SKIP_MODULE_LOAD}" ]]; then echo "* Setting up /usr/src links from host" for i in "$HOST_ROOT/usr/src"/* do - if [ -f "$i" ]; then - ln -s "$i" "/usr/src/$i" - fi + ln -s "$i" "/usr/src/$i" done /usr/bin/falco-probe-loader diff --git a/docker/local/docker-entrypoint.sh b/docker/local/docker-entrypoint.sh index fe0687e6..082abc00 100755 --- a/docker/local/docker-entrypoint.sh +++ b/docker/local/docker-entrypoint.sh @@ -18,16 +18,14 @@ # set -e -# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module +# Set the SKIP_MODULE_LOAD variable to skip loading the kernel module -if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then +if [[ -z "${SKIP_MODULE_LOAD}" ]]; then echo "* Setting up /usr/src links from host" for i in "$HOST_ROOT/usr/src"/* do - if [ -f "$i" ]; then - ln -s "$i" "/usr/src/$i" - fi + ln -s "$i" "/usr/src/$i" done /usr/bin/falco-probe-loader diff --git a/docker/rhel/docker-entrypoint.sh b/docker/rhel/docker-entrypoint.sh index fe0687e6..b28ddf2b 100755 --- a/docker/rhel/docker-entrypoint.sh +++ b/docker/rhel/docker-entrypoint.sh @@ -18,16 +18,14 @@ # set -e -# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module +# Set the SKIP_MODULE_LOAD variable to skip loading the sysdig kernel module -if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then +if [[ -z "${SKIP_MODULE_LOAD}" ]]; then echo "* Setting up /usr/src links from host" for i in "$HOST_ROOT/usr/src"/* do - if [ -f "$i" ]; then - ln -s "$i" "/usr/src/$i" - fi + ln -s "$i" "/usr/src/$i" done /usr/bin/falco-probe-loader diff --git a/docker/stable/docker-entrypoint.sh b/docker/stable/docker-entrypoint.sh index fe0687e6..082abc00 100755 --- a/docker/stable/docker-entrypoint.sh +++ b/docker/stable/docker-entrypoint.sh @@ -18,16 +18,14 @@ # set -e -# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module +# Set the SKIP_MODULE_LOAD variable to skip loading the kernel module -if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then +if [[ -z "${SKIP_MODULE_LOAD}" ]]; then echo "* Setting up /usr/src links from host" for i in "$HOST_ROOT/usr/src"/* do - if [ -f "$i" ]; then - ln -s "$i" "/usr/src/$i" - fi + ln -s "$i" "/usr/src/$i" done /usr/bin/falco-probe-loader diff --git a/scripts/falco-probe-loader b/scripts/falco-probe-loader index eb4fbe1d..e6e68286 100755 --- a/scripts/falco-probe-loader +++ b/scripts/falco-probe-loader @@ -1,3 +1,4 @@ +#!/usr/bin/env bash # # Copyright (C) 2019 The Falco Authors. #