new(scripts): allow rpm/deb users to decide at configure time which driver to use (kmod or ebpf).

Manage it via a bash dialog interface.
Moreover, use falco-driver-loader instead of dkms to build bpf/kmod after package install.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro
2022-10-12 15:43:38 +02:00
committed by poiana
parent 06fe9e6985
commit b6078ce1be
7 changed files with 103 additions and 55 deletions

View File

@@ -21,6 +21,7 @@ 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
fi
/usr/bin/falco-driver-loader --clean
@@ -33,3 +34,4 @@ fi
# if preuninstall:
# `systemd-update-helper remove-system-units <service>`
%systemd_preun 'falco@kmod.target'
%systemd_preun 'falco@ebpf.target'