From 53bd365b46ba122bf7bd9033c46d40b56eba8434 Mon Sep 17 00:00:00 2001 From: teastep Date: Wed, 31 Dec 2008 20:27:21 +0000 Subject: [PATCH] Put 'shorewall6 refresh' in trunk git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@9217 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- Shorewall-perl/Shorewall/Chains.pm | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/Shorewall-perl/Shorewall/Chains.pm b/Shorewall-perl/Shorewall/Chains.pm index 6d32258f6..3c440f289 100644 --- a/Shorewall-perl/Shorewall/Chains.pm +++ b/Shorewall-perl/Shorewall/Chains.pm @@ -2749,12 +2749,18 @@ sub create_chainlist_reload($) { emit( 'exec 3>&-', '', 'progress_message2 "Running iptables-restore..."', - '', - 'cat ${VARDIR}/.iptables-restore-input | $IPTABLES_RESTORE -n # Use this nonsensical form to appease SELinux', - 'if [ $? != 0 ]; then', + '' ); + + if ( $family == F_IPV4 ) { + emit ( 'cat ${VARDIR}/.iptables-restore-input | $IPTABLES_RESTORE -n # Use this nonsensical form to appease SELinux' ); + } else { + emit ( 'cat ${VARDIR}/.iptables-restore-input | $IP6TABLES_RESTORE -n # Use this nonsensical form to appease SELinux' ); + } + + emit ( 'if [ $? != 0 ]; then', ' fatal_error "iptables-restore Failed. Input is in ${VARDIR}/.iptables-restore-input"', "fi\n" - ); + ); } else { emit('true'); }