gateway: ignore errors in remove-before-add rule removals
authorFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Jan 2013 15:06:50 +0000 (16:06 +0100)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Mon, 7 Jan 2013 15:07:05 +0000 (16:07 +0100)
Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
files/sgw_policy_routing_setup.sh

index 2e1e4ba..0cc5dda 100755 (executable)
@@ -167,7 +167,9 @@ declare ADDMODE_IPTABLES="-D"
 declare ADDMODE_IP="del"
 if [ "${addMode}" == "${ADDMODE_ADD}" ]; then
   # first call the delete mode to remove any left-over rules
+  set +e
   "${mode}" "${@}"
+  set -e
 
   ADDMODE_IPTABLES="-I"
   ADDMODE_IP="add"