From 6dc1c3027fd83f0fbc1d7f7e9932c50d4e3b3fe6 Mon Sep 17 00:00:00 2001 From: teastep Date: Sun, 25 Mar 2007 17:06:23 +0000 Subject: [PATCH] Correct emitted code in 'setup_netfilter()' git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5684 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb --- New/Shorewall/Chains.pm | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/New/Shorewall/Chains.pm b/New/Shorewall/Chains.pm index a53b754d8..9907e535b 100644 --- a/New/Shorewall/Chains.pm +++ b/New/Shorewall/Chains.pm @@ -1430,9 +1430,13 @@ sub create_netfilter_load() { emit_unindented '__EOF__' unless $state == CMD_STATE; emit ''; - emit ' exec 3>&-'; - emit ''; - emit 'iptables-restore < $TEMPFILE' if $slowstart; + + if ( $slowstart ) { + emit ' exec 3>&-'; + emit ''; + emit 'iptables-restore < $TEMPFILE' if $slowstart; + } + emit 'if [ $? != 0 ]; then'; emit ' fatal_error "iptables-restore Failed"'; emit "fi\n";