Fixed awk bug for firewall rules.
This commit is contained in:
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user