mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-24 00:23:28 +01:00
Change /sbin/shorewall so that it doesn't corrupt correct policy match output
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@1576 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
50603f336e
commit
7b0efdc12e
@ -1096,7 +1096,7 @@ case "$1" in
|
||||
#
|
||||
# The 'awk' hack compensates for a bug in iptables-save (actually in libipt_policy.so) and can be removed when that bug is fixed.
|
||||
#
|
||||
if iptables-save | awk 'BEGIN {sline=""; }; /^-j/ { print sline $0; next }; /-m policy/ { sline=$0; next }; {print ; sline="" }' >> /var/lib/shorewall/restore-$$ ; then
|
||||
if iptables-save | awk 'BEGIN {sline=""; }; /^-j/ { print sline $0; next }; /-m policy.*-j/ { print $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
|
||||
|
Loading…
Reference in New Issue
Block a user