From a5aa2fd63cbed9abdfb7df9563bc2ffae0cbc421 Mon Sep 17 00:00:00 2001 From: Storm Dragon Date: Fri, 17 Apr 2026 16:07:15 -0400 Subject: [PATCH] Fixed awk bug for firewall rules. --- .includes/copyparty.sh | 4 ++-- .includes/minidlna.sh | 4 ++-- .includes/topspeed.sh | 3 ++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/.includes/copyparty.sh b/.includes/copyparty.sh index 9dc2d48..cc93fd9 100644 --- a/.includes/copyparty.sh +++ b/.includes/copyparty.sh @@ -17,8 +17,8 @@ valid_ipv4_subnet() { [[ "$subnetValue" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]] || return 1 awk -F '[./]' ' { - for (index = 1; index <= 4; index++) { - if ($index < 0 || $index > 255) { + for (octetIndex = 1; octetIndex <= 4; octetIndex++) { + if ($octetIndex < 0 || $octetIndex > 255) { exit 1 } } diff --git a/.includes/minidlna.sh b/.includes/minidlna.sh index 5bab19b..4c9ecb7 100644 --- a/.includes/minidlna.sh +++ b/.includes/minidlna.sh @@ -105,8 +105,8 @@ valid_ipv4_subnet() { [[ "$subnetValue" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}/([0-9]|[1-2][0-9]|3[0-2])$ ]] || return 1 awk -F '[./]' ' { - for (index = 1; index <= 4; index++) { - if ($index < 0 || $index > 255) { + for (octetIndex = 1; octetIndex <= 4; octetIndex++) { + if ($octetIndex < 0 || $octetIndex > 255) { exit 1 } } diff --git a/.includes/topspeed.sh b/.includes/topspeed.sh index b9040d3..54ae00d 100644 --- a/.includes/topspeed.sh +++ b/.includes/topspeed.sh @@ -339,7 +339,8 @@ attach_topspeed_console() { fi clear - echo "Attaching to the Top Speed console. Detach with Ctrl-b d." + echo "Attaching to the Top Speed console." + echo "To detach from the server and leave it running, press Ctrl+b followed by d." # `sudoFlags` is initialized by the main launcher before sourcing this file. # shellcheck disable=SC2154 sudo "${sudoFlags[@]}" -u "$topspeedUser" tmux attach-session -t "$topspeedSessionName"