More tweaks to saving/restoring dynamic chains

Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
Tom Eastep 2010-06-07 13:55:27 -07:00
parent 486bb73c02
commit c1bfe7d5b8
3 changed files with 4 additions and 4 deletions

View File

@ -311,7 +311,7 @@ sub save_dynamic_chains() {
my $tool = $family == F_IPV4 ? '${IPTABLES}-save' : '${IP6TABLES}-save';
emit ( 'if [ "$COMMAND" = restart -o "$COMMAND" = restore ]; then' );
emit ( 'if [ "$COMMAND" = restart -o "$COMMAND" = refresh ]; then' );
push_indent;
emit <<"EOF";
@ -327,7 +327,7 @@ else
rm -f \${VARDIR}/.forwardUPnP
fi
if [ "\$COMMAND" = restart ] && chain_exists dynamic; then
if chain_exists dynamic; then
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
else
rm -f \${VARDIR}/.dynamic
@ -345,8 +345,6 @@ rm -f \${VARDIR}/.forwardUPnP
if [ "\$COMMAND" = stop -o "\$COMMAND" = clear ]; then
if chain_exists dynamic; then
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
else
rm -f \${VARDIR}/.dynamic
fi
fi
EOF

View File

@ -218,6 +218,7 @@ case "$COMMAND" in
else
error_message "$g_product is not running"
progress_message3 "Starting $g_product...."
COMMAND=start
fi
detect_configuration

View File

@ -219,6 +219,7 @@ else
else
error_message "$g_product is not running"
progress_message3 "Starting $g_product...."
COMMAND=start
fi
detect_configuration