From 2020a548c8aa32c524aa5218b9faccc1d79d8ab8 Mon Sep 17 00:00:00 2001 From: Kornilios Kourtis Date: Mon, 12 Aug 2024 15:47:17 +0200 Subject: [PATCH] rthooks: setup do not copy binary twice For oci-hooks, the binary is copied twice. No need for that, remove the second copy. Fixes: f9913836ec Signed-off-by: Kornilios Kourtis --- contrib/tetragon-rthooks/cmd/setup/main.go | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/contrib/tetragon-rthooks/cmd/setup/main.go b/contrib/tetragon-rthooks/cmd/setup/main.go index 3704a51d0ea..eb1c2991e9e 100644 --- a/contrib/tetragon-rthooks/cmd/setup/main.go +++ b/contrib/tetragon-rthooks/cmd/setup/main.go @@ -73,9 +73,6 @@ func (i *Install) ociHooksInstall(log *slog.Logger) { signal.Notify(sigChan, syscall.SIGINT, syscall.SIGTERM) } - // copy the binary to the host - i.copyBinary(log) - // add .json file to oci hooks dir _, binBaseName := path.Split(i.LocalBinary) binFname := filepath.Join(i.HostInstallDir, binBaseName) @@ -115,6 +112,7 @@ func (i *Install) ociHooksInstall(log *slog.Logger) { func (i *Install) Run(log *slog.Logger) error { + // copy the binary to the host i.copyBinary(log) switch i.Interface { case "oci-hooks":