Commit cac9bc27 authored by Mattia Rizzolo's avatar Mattia Rizzolo

common/iptables: add some ||true as needed

Signed-off-by: Mattia Rizzolo's avatarMattia Rizzolo <mapreri@ubuntu.com>
parent a1f5d98e
......@@ -50,15 +50,15 @@ for arg; do
done
# Reset the firewall
command -D INPUT -j input 2>/dev/null # Remove firewall's input chain
command -D INPUT -j input 2>/dev/null || true # Remove firewall's input chain
# Flush chains
for chain in "${CHAINS[@]}"; do
command -F "${chain}" 2>/dev/null
command -F "${chain}" 2>/dev/null || true
done
# Delete chains -- must be done after because of references
for chain in "${CHAINS[@]}"; do
command -X "${chain}" 2>/dev/null
command -X "${chain}" 2>/dev/null || true
done
echo "Existing firewall configuration cleaned up"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment