From e9a819e55287ee06037a8b633c4ba656a5aebbbb Mon Sep 17 00:00:00 2001 From: Matthew Meszaros Date: Sat, 10 Oct 2026 08:08:02 +0000 Subject: [PATCH] feat: validate Linux enrollment fixture prerequisites before persisting retry-safe node identity in the join checker Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> --- scripts/check-join-script.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/check-join-script.sh b/scripts/check-join-script.sh index 9aa2d30f8..a84d4bd43 100755 --- a/scripts/check-join-script.sh +++ b/scripts/check-join-script.sh @@ -224,6 +224,12 @@ printf '%s\n' "$local_body" | awk ' || fail "ensure_local_env must test for an existing file before writing one, or a re-join truncates the operator's file" ok "an existing local override file is never truncated" +if ! command -v flock >/dev/null 2>&1; then + fail "enrollment fixture requires util-linux flock" +fi +[ -r /proc/sys/kernel/random/uuid ] \ + || fail "enrollment fixture requires /proc/sys/kernel/random/uuid" + join_fixture=$(mktemp -d) trap 'rm -rf "$join_fixture"' EXIT HUP INT TERM sed '$d' "$SCRIPT" > "$join_fixture/functions.sh"