mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-08 18:19:30 +00:00
chore(scripts): manage dialog cancel button, and increase dialog vertical size to comprehend all of 5 options.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
76c8a645f1
commit
4c550bbe06
@@ -15,21 +15,20 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
set -e
|
|
||||||
|
|
||||||
chosen_driver=
|
chosen_driver=
|
||||||
|
|
||||||
if [ "$1" = "configure" ]; then
|
if [ "$1" = "configure" ]; then
|
||||||
if [ -x /usr/bin/dialog ]; then
|
if [ -x /usr/bin/dialog ]; then
|
||||||
# If dialog is installed, create a dialog to let users choose the correct driver for them
|
# 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 \
|
CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 5 \
|
||||||
1 "Don't start" \
|
1 "Don't start" \
|
||||||
2 "Kmod" \
|
2 "Kmod" \
|
||||||
3 "eBPF" \
|
3 "eBPF" \
|
||||||
4 "Modern eBPF" \
|
4 "Modern eBPF" \
|
||||||
5 "Plugin" \
|
5 "Plugin" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
clear
|
if [ $? -eq 0 ]; then
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
2)
|
2)
|
||||||
chosen_driver="kmod"
|
chosen_driver="kmod"
|
||||||
@@ -45,7 +44,11 @@ if [ "$1" = "configure" ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# If needed, try to load/compile the driver through falco-driver-loader
|
# If needed, try to load/compile the driver through falco-driver-loader
|
||||||
case "$chosen_driver" in
|
case "$chosen_driver" in
|
||||||
|
@@ -14,21 +14,21 @@
|
|||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
set -e
|
|
||||||
|
|
||||||
chosen_driver=
|
chosen_driver=
|
||||||
|
|
||||||
if [ $1 -eq 1 ]; then
|
if [ $1 -eq 1 ]; then
|
||||||
if [ -x /usr/bin/dialog ]; then
|
if [ -x /usr/bin/dialog ]; then
|
||||||
# If dialog is installed, create a dialog to let users choose the correct driver for them
|
# 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 \
|
CHOICE=$(dialog --clear --backtitle "Choose your preferred driver" --title "Falco driver" --menu "Choose one of the following options:" 15 40 5 \
|
||||||
1 "Don't start" \
|
1 "Don't start" \
|
||||||
2 "Kmod" \
|
2 "Kmod" \
|
||||||
3 "eBPF" \
|
3 "eBPF" \
|
||||||
4 "Modern eBPF" \
|
4 "Modern eBPF" \
|
||||||
5 "Plugin" \
|
5 "Plugin" \
|
||||||
2>&1 >/dev/tty)
|
2>&1 >/dev/tty)
|
||||||
clear
|
# When user presses cancel, go on as default (don't start)
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
case $CHOICE in
|
case $CHOICE in
|
||||||
2)
|
2)
|
||||||
chosen_driver="kmod"
|
chosen_driver="kmod"
|
||||||
@@ -44,7 +44,11 @@ if [ $1 -eq 1 ]; then
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
fi
|
fi
|
||||||
|
clear
|
||||||
fi
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
set -e
|
||||||
|
|
||||||
# If needed, try to load/compile the driver through falco-driver-loader
|
# If needed, try to load/compile the driver through falco-driver-loader
|
||||||
case "$chosen_driver" in
|
case "$chosen_driver" in
|
||||||
|
Reference in New Issue
Block a user