From 326b91e57d6e4c793ec522ba91c3456ffdafdd81 Mon Sep 17 00:00:00 2001 From: Yuriy Mayatnikov Date: Sat, 31 Jan 2026 15:08:40 +0300 Subject: [PATCH] Fix VERSION conflict with /etc/os-release Rename script variable to SCRIPT_VERSION and source os-release in a subshell to prevent its VERSION variable from colliding with readonly. Co-Authored-By: Claude Opus 4.5 --- setup.sh | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/setup.sh b/setup.sh index 0a50d8a..23820d8 100755 --- a/setup.sh +++ b/setup.sh @@ -6,7 +6,7 @@ set -euo pipefail # Automatically enables BBR congestion control on Linux servers. # --------------------------------------------------------------------------- -readonly VERSION="1.0.0" +readonly SCRIPT_VERSION="1.0.0" readonly SYSCTL_DROP="/etc/sysctl.d/99-bbr.conf" readonly SYSCTL_MAIN="/etc/sysctl.conf" readonly MIN_KERNEL_MAJOR=4 @@ -40,7 +40,7 @@ die() { log_error "$*"; exit 1; } # ── Usage ────────────────────────────────────────────────────────────────── usage() { cat <> "$target" @@ -257,7 +256,7 @@ main() { parse_args "$@" echo "" - printf "${CYAN}${BOLD} TCP BBR Setup ${VERSION}${RESET}\n" + printf "${CYAN}${BOLD} TCP BBR Setup ${SCRIPT_VERSION}${RESET}\n" echo "" # ── Root check ─────────────────────────────────────────────────────