From 4e576705997af8ca3a774a47e0d362377fb9854d Mon Sep 17 00:00:00 2001 From: Federico Di Pierro Date: Mon, 24 Oct 2022 17:32:09 +0200 Subject: [PATCH] chore(scripts): add back a dontstart option. Signed-off-by: Federico Di Pierro --- scripts/debian/postinst.in | 4 ++++ scripts/rpm/postinstall.in | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in index f11318ba..44fb081c 100755 --- a/scripts/debian/postinst.in +++ b/scripts/debian/postinst.in @@ -25,10 +25,12 @@ case "$1" in echo "Skipping driver selection in non-interactive mode" else if [ -x /usr/bin/dialog ]; then + # If dialog is installed, create a dialog to let users choose the correct driver for them CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 4 \ 1 "Kmod" \ 2 "eBPF" \ 3 "Plugin" \ + 4 "Don't start" \ 2>&1 >/dev/tty) clear case $CHOICE in @@ -43,12 +45,14 @@ case "$1" in ;; esac else + # Default at old behavior: enable kmod driver chosen_driver="kmod" fi fi ;; esac +# If needed, try to load/compile the driver through falco-driver-loader case "$chosen_driver" in "kmod") falco-driver-loader module diff --git a/scripts/rpm/postinstall.in b/scripts/rpm/postinstall.in index fc9712f8..a413ae0f 100755 --- a/scripts/rpm/postinstall.in +++ b/scripts/rpm/postinstall.in @@ -24,10 +24,12 @@ case "$1" in echo "Skipping driver selection in non-interactive mode" else if [ -x /usr/bin/dialog ]; then + # If dialog is installed, create a dialog to let users choose the correct driver for them CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 4 \ 1 "Kmod" \ 2 "eBPF" \ 3 "Plugin" \ + 4 "Don't start" \ 2>&1 >/dev/tty) clear case $CHOICE in @@ -42,12 +44,14 @@ case "$1" in ;; esac else + # Default at old behavior: enable kmod driver chosen_driver="kmod" fi fi ;; esac +# If needed, try to load/compile the driver through falco-driver-loader case "$chosen_driver" in "kmod") falco-driver-loader module