mirror of
https://github.com/falcosecurity/falco.git
synced 2025-07-15 23:36:19 +00:00
Add kernelversion and kernelrelease options to falco driver loader entrypoint
Signed-off-by: Paul Rey <contact@paulrey.io>
This commit is contained in:
parent
2dfac14cd1
commit
2f6fdfa972
@ -28,12 +28,14 @@ print_usage() {
|
|||||||
echo " ebpf eBPF probe"
|
echo " ebpf eBPF probe"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Options:"
|
echo "Options:"
|
||||||
echo " --help show this help message"
|
echo " --help show this help message"
|
||||||
echo " --clean try to remove an already present driver installation"
|
echo " --clean try to remove an already present driver installation"
|
||||||
echo " --compile try to compile the driver locally (default true)"
|
echo " --compile try to compile the driver locally (default true)"
|
||||||
echo " --download try to download a prebuilt driver (default true)"
|
echo " --download try to download a prebuilt driver (default true)"
|
||||||
echo " --http-insecure enable insecure downloads"
|
echo " --kernel-release <value> set the kernel release"
|
||||||
echo " --print-env skip execution and print env variables for other tools to consume"
|
echo " --kernel-version <value> set the kernel version"
|
||||||
|
echo " --http-insecure enable insecure downloads"
|
||||||
|
echo " --print-env skip execution and print env variables for other tools to consume"
|
||||||
echo ""
|
echo ""
|
||||||
echo "Environment variables:"
|
echo "Environment variables:"
|
||||||
echo " FALCOCTL_DRIVER_REPOS specify different URL(s) where to look for prebuilt Falco drivers (comma separated)"
|
echo " FALCOCTL_DRIVER_REPOS specify different URL(s) where to look for prebuilt Falco drivers (comma separated)"
|
||||||
@ -55,6 +57,8 @@ ENABLE_DOWNLOAD="false"
|
|||||||
HTTP_INSECURE="false"
|
HTTP_INSECURE="false"
|
||||||
has_driver=
|
has_driver=
|
||||||
has_opts=
|
has_opts=
|
||||||
|
extra_args=
|
||||||
|
|
||||||
while test $# -gt 0; do
|
while test $# -gt 0; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
kmod|ebpf)
|
kmod|ebpf)
|
||||||
@ -85,12 +89,20 @@ while test $# -gt 0; do
|
|||||||
;;
|
;;
|
||||||
--http-insecure)
|
--http-insecure)
|
||||||
HTTP_INSECURE="true"
|
HTTP_INSECURE="true"
|
||||||
;;
|
;;
|
||||||
--source-only)
|
--source-only)
|
||||||
>&2 echo "Support dropped in Falco 0.37.0."
|
>&2 echo "Support dropped in Falco 0.37.0."
|
||||||
print_usage
|
print_usage
|
||||||
exit 1
|
exit 1
|
||||||
;;
|
;;
|
||||||
|
--kernel-release)
|
||||||
|
extra_args+="--kernelrelease=$2 "
|
||||||
|
shift
|
||||||
|
;;
|
||||||
|
--kernel-version)
|
||||||
|
extra_args+="--kernelversion=$2 "
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--print-env)
|
--print-env)
|
||||||
/usr/bin/falcoctl driver printenv
|
/usr/bin/falcoctl driver printenv
|
||||||
exit 0
|
exit 0
|
||||||
@ -109,9 +121,6 @@ while test $# -gt 0; do
|
|||||||
shift
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ -z "$has_opts" ]; then
|
echo "Extra args: $extra_args"
|
||||||
ENABLE_COMPILE="true"
|
|
||||||
ENABLE_DOWNLOAD="true"
|
|
||||||
fi
|
|
||||||
|
|
||||||
/usr/bin/falcoctl driver install --compile=$ENABLE_COMPILE --download=$ENABLE_DOWNLOAD --http-insecure=$HTTP_INSECURE --http-headers="$FALCOCTL_DRIVER_HTTP_HEADERS"
|
/usr/bin/falcoctl driver install --compile=$ENABLE_COMPILE --download=$ENABLE_DOWNLOAD --http-insecure=$HTTP_INSECURE --http-headers="$FALCOCTL_DRIVER_HTTP_HEADERS" $extra_args
|
||||||
|
Loading…
Reference in New Issue
Block a user