fix(docker): glob rather than ls in the docker entrypoints

Plus, make them use HOST_ROOT env var, not SYSDIG_HOST_ROOT

Signed-off-by: Leonardo Di Donato <leodidonato@gmail.com>
This commit is contained in:
Leonardo Di Donato 2019-11-05 15:31:09 +00:00 committed by Lorenzo Fontana
parent 9e355e1a74
commit 3ce2056dc5
4 changed files with 28 additions and 20 deletions

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2019 The Falco Authors.
#
@ -16,16 +16,18 @@
# limitations under the License.
#
#set -e
# set -e
# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module
if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then
echo "* Setting up /usr/src links from host"
for i in $(ls $SYSDIG_HOST_ROOT/usr/src)
for i in "$HOST_ROOT/usr/src"/*
do
ln -s $SYSDIG_HOST_ROOT/usr/src/$i /usr/src/$i
if [ -f "$i" ]; then
ln -s "$i" "/usr/src/$i"
fi
done
/usr/bin/falco-probe-loader

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2019 The Falco Authors.
#
@ -16,16 +16,18 @@
# limitations under the License.
#
#set -e
# set -e
# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module
if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then
echo "* Setting up /usr/src links from host"
for i in $(ls $SYSDIG_HOST_ROOT/usr/src)
for i in "$HOST_ROOT/usr/src"/*
do
ln -s $SYSDIG_HOST_ROOT/usr/src/$i /usr/src/$i
if [ -f "$i" ]; then
ln -s "$i" "/usr/src/$i"
fi
done
/usr/bin/falco-probe-loader

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2019 The Falco Authors.
#
@ -16,16 +16,18 @@
# limitations under the License.
#
#set -e
# set -e
# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module
if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then
echo "* Setting up /usr/src links from host"
for i in $(ls $SYSDIG_HOST_ROOT/usr/src)
for i in "$HOST_ROOT/usr/src"/*
do
ln -s $SYSDIG_HOST_ROOT/usr/src/$i /usr/src/$i
if [ -f "$i" ]; then
ln -s "$i" "/usr/src/$i"
fi
done
/usr/bin/falco-probe-loader

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
#
# Copyright (C) 2019 The Falco Authors.
#
@ -16,16 +16,18 @@
# limitations under the License.
#
#set -e
# set -e
# Set the SYSDIG_SKIP_LOAD variable to skip loading the sysdig kernel module
if [[ -z "${SYSDIG_SKIP_LOAD}" ]]; then
echo "* Setting up /usr/src links from host"
for i in $(ls $SYSDIG_HOST_ROOT/usr/src)
for i in "$HOST_ROOT/usr/src"/*
do
ln -s $SYSDIG_HOST_ROOT/usr/src/$i /usr/src/$i
if [ -f "$i" ]; then
ln -s "$i" "/usr/src/$i"
fi
done
/usr/bin/falco-probe-loader