Skip to content

Commit

Permalink
fix(scripts): revert part of 7a794b70a71896a3eb1971ca66cc0c19b9a104e6
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
  • Loading branch information
Andreagit97 committed Jan 30, 2023
1 parent 1d99e3d commit d5a7181
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
7 changes: 6 additions & 1 deletion scripts/debian/postinst.in
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,17 @@ set -e
echo "[POST-INSTALL] Trigger deamon-reload:"
systemctl --system daemon-reload || true

# If needed, try to load/compile the driver through falco-driver-loader (only compile for kmod, that uses dkms)
# If needed, try to load/compile the driver through falco-driver-loader
case "$chosen_driver" in
"kmod")
# Only compile for kmod, in this way we use dkms
echo "[POST-INSTALL] Call 'falco-driver-loader --compile module':"
falco-driver-loader --compile module
;;
"bpf")
echo "[POST-INSTALL] Call 'falco-driver-loader bpf':"
falco-driver-loader bpf
;;
esac

if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then
Expand Down
7 changes: 6 additions & 1 deletion scripts/rpm/postinstall.in
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,17 @@ set -e
echo "[POST-INSTALL] Trigger deamon-reload:"
systemctl --system daemon-reload || true

# If needed, try to load/compile the driver through falco-driver-loader (only compile for kmod, that uses dkms)
# If needed, try to load/compile the driver through falco-driver-loader
case "$chosen_driver" in
"kmod")
# Only compile for kmod, in this way we use dkms
echo "[POST-INSTALL] Call 'falco-driver-loader --compile module':"
falco-driver-loader --compile module
;;
"bpf")
echo "[POST-INSTALL] Call 'falco-driver-loader bpf':"
falco-driver-loader bpf
;;
esac

# validate rpm macros by `rpm -qp --scripts <rpm>`
Expand Down
1 change: 0 additions & 1 deletion scripts/systemd/falco-bpf.service
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ Wants=falcoctl-artifact-follow.service
Type=simple
User=root
Environment=FALCO_BPF_PROBE=
ExecStartPre=/usr/bin/falco-driver-loader bpf
ExecStart=/usr/bin/falco --pidfile=/var/run/falco.pid
UMask=0077
TimeoutSec=30
Expand Down

0 comments on commit d5a7181

Please sign in to comment.