mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-01 14:47:00 +00:00
chore(scripts,cmake): dialog is an optional dep, do not list it among deps.
Cleaned up unused vars in postinst scripts. Finally, only show dialog window in interactive shells. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
9232383616
commit
818f717622
@@ -16,36 +16,39 @@
|
||||
#
|
||||
set -e
|
||||
|
||||
mod_version="@DRIVER_VERSION@"
|
||||
|
||||
chosen_driver="kmod"
|
||||
|
||||
if [ -x /usr/bin/dialog ]; then
|
||||
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 "Don't start" \
|
||||
2>&1 >/dev/tty)
|
||||
clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
chosen_driver="kmod"
|
||||
;;
|
||||
2)
|
||||
chosen_driver="ebpf"
|
||||
;;
|
||||
3)
|
||||
chosen_driver=
|
||||
;;
|
||||
esac
|
||||
if [ -z "$PS1" ]; then
|
||||
echo "Skipping driver selection in non-interactive mode"
|
||||
else
|
||||
if [ -x /usr/bin/dialog ]; then
|
||||
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 "Don't start" \
|
||||
2>&1 >/dev/tty)
|
||||
clear
|
||||
case $CHOICE in
|
||||
1)
|
||||
chosen_driver="kmod"
|
||||
;;
|
||||
2)
|
||||
chosen_driver="ebpf"
|
||||
;;
|
||||
3)
|
||||
chosen_driver=
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
fi
|
||||
|
||||
case "$chosen_driver" in
|
||||
"kmod")
|
||||
falco-driver-loader module
|
||||
;;
|
||||
"ebpf")
|
||||
falco-driver-loader bpf
|
||||
;;
|
||||
"kmod")
|
||||
falco-driver-loader module
|
||||
;;
|
||||
"ebpf")
|
||||
falco-driver-loader bpf
|
||||
;;
|
||||
esac
|
||||
|
||||
# validate rpm macros by `rpm -qp --scripts <rpm>`
|
||||
|
Reference in New Issue
Block a user