From 860da2ba1595554240f3cc0406b8fb7049b830c1 Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 9 Apr 2026 13:31:20 +0000 Subject: [PATCH] fix: kali_derivative_detected test and port range error message - get_os.sh: use `= "1"` for kali_derivative_detected check for consistency with other _detected variable checks in the codebase - ip_syntax.sh: correct error message from "0-65535" to "1-65535" since port 0 is rejected by the `-gt 0` check https://claude.ai/code/session_01CokgibdWMKM8hSYezDskTH --- usr/libexec/helper-scripts/get_os.sh | 2 +- usr/libexec/helper-scripts/ip_syntax.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr/libexec/helper-scripts/get_os.sh b/usr/libexec/helper-scripts/get_os.sh index b9753a96..e4f5b84a 100755 --- a/usr/libexec/helper-scripts/get_os.sh +++ b/usr/libexec/helper-scripts/get_os.sh @@ -172,7 +172,7 @@ get_distro() { ;; esac - if test "${oracle_repo:-}" = "1" && test "${kali_derivative_detected:-}"; then + if test "${oracle_repo:-}" = "1" && test "${kali_derivative_detected:-}" = "1"; then die 1 "Distribution Extended Check: Oracle repository does not work with Kali." fi diff --git a/usr/libexec/helper-scripts/ip_syntax.sh b/usr/libexec/helper-scripts/ip_syntax.sh index b37fb55e..4c87dc09 100755 --- a/usr/libexec/helper-scripts/ip_syntax.sh +++ b/usr/libexec/helper-scripts/ip_syntax.sh @@ -35,7 +35,7 @@ is_addr_port(){ if [ "${port}" -gt 0 ] && [ "${port}" -le 65535 ]; then true "is_addr_port test: Valid port: '${port}'" else - die 2 "${underline}is_addr_port test:${nounderline} Invalid port '${port}', not within range: 0-65535." + die 2 "${underline}is_addr_port test:${nounderline} Invalid port '${port}', not within range: 1-65535." fi for quad in $(printf '%s\n' "${addr}" | tr "." " "); do