syntax and readability

This commit is contained in:
Jérémy Lecour 2021-05-22 23:14:40 +02:00 committed by Jérémy Lecour
parent 773d7086fc
commit dfc91a0689

View file

@ -100,14 +100,14 @@ is_ipv6_enabled() {
is_docker_enabled() {
test "${DOCKER}" = "on"
}
chain_exists() {
local chain_name="$1" ; shift
[ $# -eq 1 ] && local intable="--table $1"
chain_name="$1"
if [ $# -ge 2 ]; then
intable="--table $2"
fi
# shellcheck disable=SC2086
iptables ${intable} -nL "${chain_name}" >/dev/null 2>&1
}
source_file_or_error() {
file=$1
echo "...sourcing '${file}\`"
@ -233,7 +233,6 @@ start() {
# ${IPT} -t NAT -I PREROUTING -s ${LOOPBACK} -i ! lo -j DROP
${IPT} -A INPUT -s ${LOOPBACK} ! -i lo -j DROP
if is_docker_enabled; then
${IPT} -N MINIFW-DOCKER-TRUSTED
${IPT} -A MINIFW-DOCKER-TRUSTED -j DROP