default value for $intable

This commit is contained in:
Jérémy Lecour 2022-03-16 23:46:13 +01:00 committed by Jérémy Lecour
parent 25893ee66b
commit 434f8e1905
1 changed files with 2 additions and 0 deletions

View File

@ -115,6 +115,8 @@ chain_exists() {
chain_name="$1"
if [ $# -ge 2 ]; then
intable="--table $2"
else
intable=""
fi
# shellcheck disable=SC2086
iptables ${intable} -nL "${chain_name}" >/dev/null 2>&1