mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-07 17:54:07 +00:00
new(scripts, cmake): added support for modern bpf probe.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
c6f668bc71
commit
cb20cf83ff
@@ -26,7 +26,8 @@ case "$1" in
|
||||
1 "Don't start" \
|
||||
2 "Kmod" \
|
||||
3 "eBPF" \
|
||||
4 "Plugin" \
|
||||
4 "Modern eBPF" \
|
||||
5 "Plugin" \
|
||||
2>&1 >/dev/tty)
|
||||
clear
|
||||
case $CHOICE in
|
||||
@@ -34,9 +35,12 @@ case "$1" in
|
||||
chosen_driver="kmod"
|
||||
;;
|
||||
3)
|
||||
chosen_driver="ebpf"
|
||||
chosen_driver="bpf"
|
||||
;;
|
||||
4)
|
||||
chosen_driver="modern_bpf"
|
||||
;;
|
||||
5)
|
||||
chosen_driver="plugin"
|
||||
;;
|
||||
esac
|
||||
@@ -49,7 +53,7 @@ case "$chosen_driver" in
|
||||
"kmod")
|
||||
falco-driver-loader module
|
||||
;;
|
||||
"ebpf")
|
||||
"bpf")
|
||||
falco-driver-loader bpf
|
||||
;;
|
||||
esac
|
||||
@@ -67,7 +71,8 @@ esac
|
||||
if [ $1 -eq 1 ]; then
|
||||
# This will only remove masks created on package removal.
|
||||
/usr/bin/systemctl --system unmask "falco@kmod.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@ebpf.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@bpf.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@modern_bpf.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@plugin.target" >/dev/null || true
|
||||
|
||||
if [ -n "$chosen_driver" ]; then
|
||||
|
@@ -21,7 +21,8 @@ set -e
|
||||
if [ -d /run/systemd/system ] && [ "$1" = 0 ]; then
|
||||
/usr/bin/systemctl --system daemon-reload >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@kmod.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@ebpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@modern_bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@plugin.target' >/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -33,5 +34,6 @@ fi
|
||||
# if package upgrade, not uninstall:
|
||||
# `systemd-update-helper mark-restart-system-units <service>`
|
||||
%systemd_postun_with_restart 'falco@kmod.target'
|
||||
%systemd_postun_with_restart 'falco@ebpf.target'
|
||||
%systemd_postun_with_restart 'falco@bpf.target'
|
||||
%systemd_postun_with_restart 'falco@modern_bpf.target'
|
||||
%systemd_postun_with_restart 'falco@plugin.target'
|
||||
|
@@ -21,7 +21,8 @@ set -e
|
||||
if [ -d /run/systemd/system ] && [ $1 -eq 0 ]; then
|
||||
# stop falco service before uninstall
|
||||
/usr/bin/systemctl --system stop 'falco@kmod.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system stop 'falco@ebpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system stop 'falco@bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system stop 'falco@modern_bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system stop 'falco@plugin.target' >/dev/null || true
|
||||
fi
|
||||
|
||||
@@ -35,5 +36,6 @@ fi
|
||||
# if preuninstall:
|
||||
# `systemd-update-helper remove-system-units <service>`
|
||||
%systemd_preun 'falco@kmod.target'
|
||||
%systemd_preun 'falco@ebpf.target'
|
||||
%systemd_preun 'falco@bpf.target'
|
||||
%systemd_preun 'falco@modern_bpf.target'
|
||||
%systemd_preun 'falco@plugin.target'
|
||||
|
Reference in New Issue
Block a user