From 8c8fa0f0c87218cb5af6323a11a43cdb31e54db1 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 18 Aug 2004 18:12:41 +0000 Subject: [PATCH] Workaround for iptables-save bug git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1552 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall2/shorewall | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Shorewall2/shorewall b/Shorewall2/shorewall index 5eff7debf..04b90b27d 100755 --- a/Shorewall2/shorewall +++ b/Shorewall2/shorewall @@ -1044,7 +1044,7 @@ case "$1" in echo " Dynamic Rules Saved" if [ -f /var/lib/shorewall/restore-base ]; then cp -f /var/lib/shorewall/restore-base /var/lib/shorewall/restore-$$ - if iptables-save >> /var/lib/shorewall/restore-$$ ; then + if iptables-save | awk 'BEGIN {sline=""; }; /^-j/ { print sline $0; next }; /-m policy/ { sline=$0; next }; {print ; sline="" }' >> /var/lib/shorewall/restore-$$ ; then echo __EOF__ >> /var/lib/shorewall/restore-$$ mv -f /var/lib/shorewall/restore-$$ $RESTOREPATH chmod +x $RESTOREPATH