* FIX script aborts if nonexistent devices are in the script argument
[lab.git] / iptables / setnapt.sh
index d34ba37..6093f6d 100644 (file)
@@ -42,7 +42,7 @@ for GW in ${GATEWAYS}; do
     IPADDR=`/sbin/ip addr show dev ${GW} | grep -w inet | cut -d t -f 2 | cut -d ' ' -f 2 | cut -d / -f 1`
     if [ -z "${IPADDR}" ]; then
         # device doesn't seem to have an IP address
-        break
+        continue
     fi
     
     ## set masquerade rule to all devices