From c5c6c50df021f47932dcf64b35cacfa7e2f4fbc6 Mon Sep 17 00:00:00 2001 From: tschettervictor <85497460+tschettervictor@users.noreply.github.com> Date: Thu, 9 Oct 2025 09:14:18 -0600 Subject: [PATCH] rdr: spacing update --- usr/local/share/bastille/rdr.sh | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/usr/local/share/bastille/rdr.sh b/usr/local/share/bastille/rdr.sh index 08f953cb..44557e8f 100644 --- a/usr/local/share/bastille/rdr.sh +++ b/usr/local/share/bastille/rdr.sh @@ -258,7 +258,7 @@ while [ "$#" -gt 0 ]; do ;; -d|--destination) if ifconfig | grep -owq "inet ${2}"; then - OPTION_DST=1 + OPTION_DST=1 RDR_DST="${2}" shift 2 else @@ -277,12 +277,12 @@ while [ "$#" -gt 0 ]; do ;; -s|--source) if echo "${2}" | grep -Eoq "([0-9]+\.[0-9]+\.[0-9]+\.[0-9]+|.*:.*)"; then - check_rdr_ip_validity "${2}" - RDR_SRC="${2}" + check_rdr_ip_validity "${2}" + RDR_SRC="${2}" else - check_rdr_table_validity "${2}" - OPT_SRC_TABLE=1 - RDR_SRC="$(echo "${2}" | sed -e 's/^//')" + check_rdr_table_validity "${2}" + OPT_SRC_TABLE=1 + RDR_SRC="$(echo "${2}" | sed -e 's/^//')" fi OPTION_SRC=1 shift 2 @@ -377,11 +377,11 @@ while [ "$#" -gt 0 ]; do validate_rdr_rule "$RDR_IF" $RDR_SRC $RDR_DST $1 $2 $3 persist_rdr_rule $RDR_INET "$RDR_IF" $RDR_SRC $RDR_DST $1 $2 $3 load_rdr_rule $RDR_INET "$RDR_IF" $RDR_SRC $RDR_DST $1 $2 $3 - # Temp block to remove old format after new format is loaded the first time - while read rules; do - if [ "$(echo ${rules} | wc -w)" -lt 6 ]; then - sed -i '' "/^${rules}$/d" "${bastille_jailsdir}/${TARGET}/rdr.conf" - fi + # Temp block to remove old format after new format is loaded the first time + while read rules; do + if [ "$(echo ${rules} | wc -w)" -lt 6 ]; then + sed -i '' "/^${rules}$/d" "${bastille_jailsdir}/${TARGET}/rdr.conf" + fi done < "${bastille_jailsdir}/${TARGET}/rdr.conf" shift "$#" else