diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt index 65d3730e..db83c22a 100644 --- a/scripts/CMakeLists.txt +++ b/scripts/CMakeLists.txt @@ -31,14 +31,14 @@ configure_file("${PROJECT_SOURCE_DIR}/scripts/systemd/falcoctl-artifact-follow.s "${PROJECT_BINARY_DIR}/scripts/systemd" COPYONLY) # Debian -configure_file(debian/postinst.in debian/postinst) -configure_file(debian/postrm.in debian/postrm) -configure_file(debian/prerm.in debian/prerm) +configure_file(debian/postinst.in debian/postinst COPYONLY) +configure_file(debian/postrm.in debian/postrm COPYONLY) +configure_file(debian/prerm.in debian/prerm COPYONLY) # Rpm -configure_file(rpm/postinstall.in rpm/postinstall) -configure_file(rpm/postuninstall.in rpm/postuninstall) -configure_file(rpm/preuninstall.in rpm/preuninstall) +configure_file(rpm/postinstall.in rpm/postinstall COPYONLY) +configure_file(rpm/postuninstall.in rpm/postuninstall COPYONLY) +configure_file(rpm/preuninstall.in rpm/preuninstall COPYONLY) configure_file(falco-driver-loader falco-driver-loader @ONLY) diff --git a/scripts/debian/postinst.in b/scripts/debian/postinst.in index a9fc8e83..2c493ede 100755 --- a/scripts/debian/postinst.in +++ b/scripts/debian/postinst.in @@ -35,7 +35,7 @@ systemctl --system disable 'falcoctl-artifact-follow.service' || true systemctl --system unmask falcoctl-artifact-follow.service || true if [ "$1" = "configure" ]; then - if [ -x /usr/bin/dialog ]; then + if [ -x /usr/bin/dialog ] && [ "${FALCO_FRONTEND}" != "noninteractive" ]; then # If dialog is installed, create a dialog to let users choose the correct driver for them CHOICE=$(dialog --clear --title "Falco drivers" --menu "Choose your preferred driver:" 12 55 4 \ 1 "Manual configuration (no unit is started)" \ diff --git a/scripts/rpm/postinstall.in b/scripts/rpm/postinstall.in index d776b753..feb90f02 100755 --- a/scripts/rpm/postinstall.in +++ b/scripts/rpm/postinstall.in @@ -34,7 +34,7 @@ systemctl --system disable 'falcoctl-artifact-follow.service' || true systemctl --system unmask falcoctl-artifact-follow.service || true if [ $1 -eq 1 ]; then - if [ -x /usr/bin/dialog ]; then + if [ -x /usr/bin/dialog ] && [ "${FALCO_FRONTEND}" != "noninteractive" ]; then # If dialog is installed, create a dialog to let users choose the correct driver for them CHOICE=$(dialog --clear --title "Falco drivers" --menu "Choose your preferred driver:" 12 55 4 \ 1 "Manual configuration (no unit is started)" \