Fix shellcheck warnings across all scripts
Quote all variable expansions in setup-bridge.sh, teardown-bridge.sh, and install.sh. Fix redirect order and unused variable in test-suite.sh. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -9,12 +9,12 @@ SUBNET="172.16.0.0/24"
|
||||
EXT_IFACE=$(ip route show default | awk '{print $5; exit}')
|
||||
|
||||
echo "Removing NAT rules..."
|
||||
iptables -t nat -D POSTROUTING -s ${SUBNET} -o ${EXT_IFACE} -j MASQUERADE 2>/dev/null || true
|
||||
iptables -D FORWARD -i ${BRIDGE} -o ${EXT_IFACE} -j ACCEPT 2>/dev/null || true
|
||||
iptables -D FORWARD -i ${EXT_IFACE} -o ${BRIDGE} -m state --state RELATED,ESTABLISHED -j ACCEPT 2>/dev/null || true
|
||||
iptables -t nat -D POSTROUTING -s "${SUBNET}" -o "${EXT_IFACE}" -j MASQUERADE 2>/dev/null || true
|
||||
iptables -D FORWARD -i "${BRIDGE}" -o "${EXT_IFACE}" -j ACCEPT 2>/dev/null || true
|
||||
iptables -D FORWARD -i "${EXT_IFACE}" -o "${BRIDGE}" -m state --state RELATED,ESTABLISHED -j ACCEPT 2>/dev/null || true
|
||||
|
||||
echo "Removing bridge ${BRIDGE}..."
|
||||
ip link set ${BRIDGE} down 2>/dev/null || true
|
||||
ip link del ${BRIDGE} 2>/dev/null || true
|
||||
ip link set "${BRIDGE}" down 2>/dev/null || true
|
||||
ip link del "${BRIDGE}" 2>/dev/null || true
|
||||
|
||||
echo "Done."
|
||||
|
||||
Reference in New Issue
Block a user