osmith has submitted this change. ( 
https://gerrit.osmocom.org/c/osmo-dev/+/27452 )

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

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
---
M net/templates/run.sh
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  osmith: Looks good to me, approved; Verified



diff --git a/net/templates/run.sh b/net/templates/run.sh
index e4e8356..c19c081 100755
--- a/net/templates/run.sh
+++ b/net/templates/run.sh
@@ -21,7 +21,7 @@

 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

--
To view, visit https://gerrit.osmocom.org/c/osmo-dev/+/27452
To unsubscribe, or for help writing mail filters, visit 
https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-dev
Gerrit-Branch: master
Gerrit-Change-Id: Ibe031725cbb68ec55664dd025b1ffc247db08148
Gerrit-Change-Number: 27452
Gerrit-PatchSet: 1
Gerrit-Owner: osmith <[email protected]>
Gerrit-Reviewer: osmith <[email protected]>
Gerrit-MessageType: merged

Reply via email to