shellcheck errors: SC2068 Double quote array expansions to avoid re-splitting elements.

This commit is contained in:
Juan David Hurtado G
2024-11-24 20:49:06 -05:00
parent c8a2b3a784
commit 11b75f5dad
2 changed files with 6 additions and 6 deletions

View File

@@ -58,7 +58,7 @@ error_notify() {
# Notify message on error and exit
error_exit() {
error_notify $@
error_notify "$@"
exit 1
}

View File

@@ -183,21 +183,21 @@ while [ $# -gt 0 ]; do
jail_port=$3
shift 3
if [ $# -gt 3 ]; then
for last in $@; do
for last in "$@"; do
true
done
if [ $2 == "(" ] && [ $last == ")" ] ; then
check_jail_validity
persist_rdr_log_rule $proto $host_port $jail_port $@
load_rdr_log_rule $proto $host_port $jail_port $@
persist_rdr_log_rule $proto $host_port $jail_port "$@"
load_rdr_log_rule $proto $host_port $jail_port "$@"
shift $#
else
usage
fi
elif [ $# -eq 1 ]; then
check_jail_validity
persist_rdr_log_rule $proto $host_port $jail_port $@
load_rdr_log_rule $proto $host_port $jail_port $@
persist_rdr_log_rule $proto $host_port $jail_port "$@"
load_rdr_log_rule $proto $host_port $jail_port "$@"
shift 1
else
usage