diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in index 36340cbc..3217dbc5 100755 --- a/scripts/debian/postinst.in +++ b/scripts/debian/postinst.in @@ -19,8 +19,7 @@ set -e chosen_driver= -case "$1" in - configure) +if [ "$1" = "configure" ]; then 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 \ @@ -46,8 +45,7 @@ case "$1" in ;; esac fi - ;; -esac +fi # If needed, try to load/compile the driver through falco-driver-loader case "$chosen_driver" in diff --git a/scripts/rpm/postinstall.in b/scripts/rpm/postinstall.in index 2b3d1c93..4677deed 100755 --- a/scripts/rpm/postinstall.in +++ b/scripts/rpm/postinstall.in @@ -18,8 +18,7 @@ set -e chosen_driver= -case "$1" in - configure) +if [ $1 -eq 1 ]; then 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 \ @@ -45,8 +44,7 @@ case "$1" in ;; esac fi - ;; -esac +fi # If needed, try to load/compile the driver through falco-driver-loader case "$chosen_driver" in