mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-31 14:20:04 +00:00
chore(scripts): when running in non-interactive mode, do not enable neither start any driver.
Eg: when building Falco docker image, and installing Falco package, we don't want it to build any driver. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
818f717622
commit
e26aa6a385
@@ -17,14 +17,14 @@
|
||||
#
|
||||
set -e
|
||||
|
||||
chosen_driver="kmod"
|
||||
chosen_driver=
|
||||
|
||||
if [ -z "$PS1" ]; then
|
||||
echo "Skipping driver selection in non-interactive mode"
|
||||
else
|
||||
case "$1" in
|
||||
case "$1" in
|
||||
configure)
|
||||
if [ -x /usr/bin/dialog ]; then
|
||||
if [ ! -t 0 ] ; 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" \
|
||||
@@ -42,10 +42,12 @@ else
|
||||
chosen_driver=
|
||||
;;
|
||||
esac
|
||||
else
|
||||
chosen_driver="kmod"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
esac
|
||||
|
||||
case "$chosen_driver" in
|
||||
"kmod")
|
||||
|
@@ -16,31 +16,37 @@
|
||||
#
|
||||
set -e
|
||||
|
||||
chosen_driver="kmod"
|
||||
chosen_driver=
|
||||
|
||||
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 "$1" in
|
||||
configure)
|
||||
if [ ! -t 0 ] ; 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
|
||||
else
|
||||
chosen_driver="kmod"
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
||||
case "$chosen_driver" in
|
||||
"kmod")
|
||||
|
Reference in New Issue
Block a user