From 6ae30755266803052e44875e9f54febf50c30e97 Mon Sep 17 00:00:00 2001 From: ANHELL <275190042+ANHELL404@users.noreply.github.com> Date: Thu, 15 Oct 2026 02:22:31 +0300 Subject: [PATCH 1/3] Update bootstrap.go --- internal/bootstrap/bootstrap.go | 1 + 1 file changed, 1 insertion(+) diff --git a/internal/bootstrap/bootstrap.go b/internal/bootstrap/bootstrap.go index ba7da8f..2051a92 100644 --- a/internal/bootstrap/bootstrap.go +++ b/internal/bootstrap/bootstrap.go @@ -1621,6 +1621,7 @@ ufw status | grep -qx 'Status: active' `, fallbackSSHPort) } return fmt.Sprintf(`set -eu + install -d -m 0755 /usr/local/bin %sinstall -m 0755 %s /usr/local/bin/nodeflow-node-agent.new mv -f /usr/local/bin/nodeflow-node-agent.new /usr/local/bin/nodeflow-node-agent %s From 81f79fe343f98e0ce443e9331c6ac35065415abe Mon Sep 17 00:00:00 2001 From: ANHELL <275190042+ANHELL404@users.noreply.github.com> Date: Thu, 15 Oct 2026 02:23:14 +0300 Subject: [PATCH 2/3] Update install-node.sh --- scripts/install-node.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/scripts/install-node.sh b/scripts/install-node.sh index 2c323c8..5cadecd 100755 --- a/scripts/install-node.sh +++ b/scripts/install-node.sh @@ -207,6 +207,7 @@ main() { esac if [[ -n ${NODE_AGENT_BINARY:-} ]]; then + install -d -m 0755 /usr/local/bin install -m 0755 "${NODE_AGENT_BINARY}" /usr/local/bin/nodeflow-node-agent.new elif [[ ${NODEFLOW_AGENT_SOURCE:-release} == build ]]; then command -v go >/dev/null || { echo "go is required for NODEFLOW_AGENT_SOURCE=build" >&2; exit 1; } From 145d511a203e105c40f439f003a3d57c4d466da1 Mon Sep 17 00:00:00 2001 From: SHOKOV <74192268+SHOKOVprod@users.noreply.github.com> Date: Thu, 15 Oct 2026 03:36:29 +0300 Subject: [PATCH 3/3] bootstrap: create /usr/local/bin for every agent source; test order Co-authored-by: ANHELL <275190042+ANHELL404@users.noreply.github.com> --- internal/bootstrap/bootstrap_test.go | 2 ++ scripts/install-node.sh | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/bootstrap/bootstrap_test.go b/internal/bootstrap/bootstrap_test.go index ee63eb9..3eec7f7 100644 --- a/internal/bootstrap/bootstrap_test.go +++ b/internal/bootstrap/bootstrap_test.go @@ -255,6 +255,8 @@ func TestInstallScriptAptOnlyOnDebianFamily(t *testing.T) { assert.Contains(t, ubuntu, "IOWeight=20") assert.Contains(t, ubuntu, "TasksMax=64") assert.Contains(t, ubuntu, "mv -f /usr/local/bin/nodeflow-node-agent.new") + assert.Less(t, strings.Index(ubuntu, "install -d -m 0755 /usr/local/bin\n"), strings.Index(ubuntu, "/usr/local/bin/nodeflow-node-agent.new")) + assert.GreaterOrEqual(t, strings.Index(ubuntu, "install -d -m 0755 /usr/local/bin\n"), 0) assert.Contains(t, ubuntu, "systemctl restart nodeflow-node-agent.service") assert.Contains(t, ubuntu, "systemctl is-active --quiet nodeflow-node-agent.service") assert.NotContains(t, ubuntu, "ufw --force enable") diff --git a/scripts/install-node.sh b/scripts/install-node.sh index 5cadecd..625dcd0 100755 --- a/scripts/install-node.sh +++ b/scripts/install-node.sh @@ -206,8 +206,8 @@ main() { ;; esac + install -d -m 0755 /usr/local/bin if [[ -n ${NODE_AGENT_BINARY:-} ]]; then - install -d -m 0755 /usr/local/bin install -m 0755 "${NODE_AGENT_BINARY}" /usr/local/bin/nodeflow-node-agent.new elif [[ ${NODEFLOW_AGENT_SOURCE:-release} == build ]]; then command -v go >/dev/null || { echo "go is required for NODEFLOW_AGENT_SOURCE=build" >&2; exit 1; }