net/templates/run.sh: proper iptables -> /dev/null

Fix displaying unrelated message from iptables by redirecting both
stdout and stderr to /dev/null.

Change-Id: Ibe031725cbb68ec55664dd025b1ffc247db08148
changes/52/27452/1
Oliver Smith 11 months ago
parent 67cd47f0e8
commit cef58b3d09
  1. 2
      net/templates/run.sh

@ -21,7 +21,7 @@ apn="${APN_DEV}"
sudo true || exit 1
if ! sudo iptables -t nat -C POSTROUTING -s ${GGSN_NET} -o $dev -j MASQUERADE 2>/dev/null; then
if ! sudo iptables -t nat -C POSTROUTING -s ${GGSN_NET} -o $dev -j MASQUERADE >/dev/null 2>&1; then
echo "Adding iptables rule for masquerade"
sudo iptables -t nat -I POSTROUTING -s ${GGSN_NET} -o $dev -j MASQUERADE
fi

Loading…
Cancel
Save