From 13991f1ea7b549607a93dbfd9f44c2c07cc671f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vicente=20J=2E=20Jim=C3=A9nez=20Miras?= Date: Tue, 5 Sep 2023 15:16:01 +0200 Subject: [PATCH] Add use of FALCO_DRIVER_CHOICE and FALCOCTL_ENABLED env vars MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Vicente J. Jiménez Miras --- scripts/debian/postinst.in | 19 +++++++++++++++++++ scripts/rpm/postinstall.in | 19 +++++++++++++++++++ 2 files changed, 38 insertions(+) diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in index 425981b5..b0d5b305 100755 --- a/scripts/debian/postinst.in +++ b/scripts/debian/postinst.in @@ -68,6 +68,25 @@ if [ "$1" = "configure" ]; then esac fi clear + else + case $FALCO_DRIVER_CHOICE in + module | kmod ) + chosen_driver="kmod" + ;; + bpf | ebpf | eBPF ) + chosen_driver="bpf" + ;; + modern-bpf | modern-ebpf | modern-eBPF ) + chosen_driver="modern-bpf" + ;; + esac + case $FALCOCTL_ENABLED in + yes ) + ;; + no ) + systemctl --system mask falcoctl-artifact-follow.service || true + ;; + esac fi fi diff --git a/scripts/rpm/postinstall.in b/scripts/rpm/postinstall.in index 58ed2ec7..dbdf2d46 100755 --- a/scripts/rpm/postinstall.in +++ b/scripts/rpm/postinstall.in @@ -67,6 +67,25 @@ if [ $1 -ge 1 ]; then esac fi clear + else + case $FALCO_DRIVER_CHOICE in + module | kmod ) + chosen_driver="kmod" + ;; + bpf | ebpf | eBPF ) + chosen_driver="bpf" + ;; + modern-bpf | modern-ebpf | modern-eBPF ) + chosen_driver="modern-bpf" + ;; + esac + case $FALCOCTL_ENABLED in + yes ) + ;; + no ) + systemctl --system mask falcoctl-artifact-follow.service || true + ;; + esac fi fi