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
This commit is contained in:
Oliver Smith 2022-02-23 17:12:09 +01:00
parent 67cd47f0e8
commit cef58b3d09
1 changed files with 1 additions and 1 deletions

View File

@ -21,7 +21,7 @@ apn="${APN_DEV}"
sudo true || exit 1 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" echo "Adding iptables rule for masquerade"
sudo iptables -t nat -I POSTROUTING -s ${GGSN_NET} -o $dev -j MASQUERADE sudo iptables -t nat -I POSTROUTING -s ${GGSN_NET} -o $dev -j MASQUERADE
fi fi