From e4e11ad5f19a12c1c81a5d8e65fd645cb83a1c1c Mon Sep 17 00:00:00 2001 From: Tom Eastep Date: Mon, 9 Jan 2012 06:49:45 -0800 Subject: [PATCH] Correct iptablesbug() to handle -g Signed-off-by: Tom Eastep --- Shorewall-core/lib.cli | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Shorewall-core/lib.cli b/Shorewall-core/lib.cli index 71bdb84d0..af86be1c5 100644 --- a/Shorewall-core/lib.cli +++ b/Shorewall-core/lib.cli @@ -82,11 +82,11 @@ iptablesbug() if [ $g_family -eq 4 ]; then if qt mywhich awk ; then awk 'BEGIN { sline=""; };\ - /^-j/ { print sline $0; next };\ - /-m policy.*-j/ { print $0; next };\ - /-m policy/ { sline=$0; next };\ - /--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\ - { print ; sline="" }' + /^-[jg]/ { print sline $0; next };\ + /-m policy.*-[jg] / { print $0; next };\ + /-m policy/ { sline=$0; next };\ + /--mask ff/ { sub( /--mask ff/, "--mask 0xff" ) };\ + { print ; sline="" }' else echo " WARNING: You don't have 'awk' on this system so the output of the save command may be unusable" >&2 cat