From 1dd47668dd7737f493584f7f6edebd06fdfe58ec Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Tue, 28 Nov 2023 10:09:09 +0100 Subject: [PATCH] chore(scripts): only configure falcoctl driver type when a driver is selected. Signed-off-by: Federico Di Pierro --- scripts/debian/postinst.in | 4 ++-- scripts/rpm/postinstall.in | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in index 91e123e5..b9c2bf3c 100755 --- a/scripts/debian/postinst.in +++ b/scripts/debian/postinst.in @@ -60,6 +60,8 @@ if [ "$1" = "configure" ]; then ;; esac if [ -n "$chosen_driver" ]; then + echo "[POST-INSTALL] Configure falcoctl driver type:" + falcoctl driver config --type $chosen_driver CHOICE=$(dialog --clear --title "Falcoctl" --menu "Do you want to follow automatic ruleset updates?" 10 40 2 \ 1 "Yes" \ 2 "No" \ @@ -100,8 +102,6 @@ echo "[POST-INSTALL] Trigger deamon-reload:" systemctl --system daemon-reload || true # If needed, try to load/compile the driver through falcoctl -echo "[POST-INSTALL] Configure falcoctl driver type:" -falcoctl driver config --type $chosen_driver case "$chosen_driver" in "kmod") # Only compile for kmod, in this way we use dkms diff --git a/scripts/rpm/postinstall.in b/scripts/rpm/postinstall.in index 0c68061a..6dab1f48 100755 --- a/scripts/rpm/postinstall.in +++ b/scripts/rpm/postinstall.in @@ -59,6 +59,8 @@ if [ $1 -ge 1 ]; then ;; esac if [ -n "$chosen_driver" ]; then + echo "[POST-INSTALL] Configure falcoctl driver type:" + falcoctl driver config --type $chosen_driver CHOICE=$(dialog --clear --title "Falcoctl" --menu "Do you want to follow automatic ruleset updates?" 10 40 2 \ 1 "Yes" \ 2 "No" \ @@ -99,8 +101,6 @@ echo "[POST-INSTALL] Trigger deamon-reload:" systemctl --system daemon-reload || true # If needed, try to load/compile the driver through falcoctl -echo "[POST-INSTALL] Configure falcoctl driver type:" -falcoctl driver config --type $chosen_driver case "$chosen_driver" in "kmod") # Only compile for kmod, in this way we use dkms