On Tue, Sep 29, 2020 at 11:41:02AM +0800, Yu Chuan wrote:
--- a/sparrow/2-network/iptables +++ b/sparrow/2-network/iptables @@ -12,15 +12,18 @@ iptables -I FORWARD 1 -j ACCEPT iptables -t nat -A POSTROUTING -o "$PUB_IFACE" -s $BR0_SUBNET -j MASQUERADE iptables -t nat -A POSTROUTING -o $BR0_IFACE -d $BR0_SUBNET -j MASQUERADE
-systemctl status firewalld | grep -q "running" && {
+if command -v "firewall-cmd" > /dev/null; then
^-- maybe you can add $() or ``, to make it more clear.
$() is used for testing output, however here we only need test exit code.
Thanks, Fengguang