Skip to content

Commit

Permalink
fix: configure_file in CMake
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
  • Loading branch information
Andreagit97 authored and poiana committed Jan 28, 2023
1 parent 7bdebf5 commit 660da98
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
12 changes: 6 additions & 6 deletions scripts/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
2 changes: 1 addition & 1 deletion scripts/debian/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)" \
Expand Down
2 changes: 1 addition & 1 deletion scripts/rpm/postinstall.in
Original file line number Diff line number Diff line change
Expand Up @@ -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)" \
Expand Down

0 comments on commit 660da98

Please sign in to comment.