chore(scripts): only configure falcoctl driver type when a driver is selected.

Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
Federico Di Pierro 2023-11-28 10:09:09 +01:00 committed by poiana
parent 5eb2ae8d76
commit 1dd47668dd
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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