forked from extern/shorewall_code
More tweaks to saving/restoring dynamic chains
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
486bb73c02
commit
c1bfe7d5b8
@ -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
|
||||
|
@ -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
|
||||
|
@ -219,6 +219,7 @@ else
|
||||
else
|
||||
error_message "$g_product is not running"
|
||||
progress_message3 "Starting $g_product...."
|
||||
COMMAND=start
|
||||
fi
|
||||
|
||||
detect_configuration
|
||||
|
Loading…
Reference in New Issue
Block a user