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';
|
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;
|
push_indent;
|
||||||
|
|
||||||
emit <<"EOF";
|
emit <<"EOF";
|
||||||
@ -327,7 +327,7 @@ else
|
|||||||
rm -f \${VARDIR}/.forwardUPnP
|
rm -f \${VARDIR}/.forwardUPnP
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "\$COMMAND" = restart ] && chain_exists dynamic; then
|
if chain_exists dynamic; then
|
||||||
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
|
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
|
||||||
else
|
else
|
||||||
rm -f \${VARDIR}/.dynamic
|
rm -f \${VARDIR}/.dynamic
|
||||||
@ -345,8 +345,6 @@ rm -f \${VARDIR}/.forwardUPnP
|
|||||||
if [ "\$COMMAND" = stop -o "\$COMMAND" = clear ]; then
|
if [ "\$COMMAND" = stop -o "\$COMMAND" = clear ]; then
|
||||||
if chain_exists dynamic; then
|
if chain_exists dynamic; then
|
||||||
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
|
$tool -t filter | grep '^-A dynamic ' > \${VARDIR}/.dynamic
|
||||||
else
|
|
||||||
rm -f \${VARDIR}/.dynamic
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
EOF
|
EOF
|
||||||
|
@ -218,6 +218,7 @@ case "$COMMAND" in
|
|||||||
else
|
else
|
||||||
error_message "$g_product is not running"
|
error_message "$g_product is not running"
|
||||||
progress_message3 "Starting $g_product...."
|
progress_message3 "Starting $g_product...."
|
||||||
|
COMMAND=start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
detect_configuration
|
detect_configuration
|
||||||
|
@ -219,6 +219,7 @@ else
|
|||||||
else
|
else
|
||||||
error_message "$g_product is not running"
|
error_message "$g_product is not running"
|
||||||
progress_message3 "Starting $g_product...."
|
progress_message3 "Starting $g_product...."
|
||||||
|
COMMAND=start
|
||||||
fi
|
fi
|
||||||
|
|
||||||
detect_configuration
|
detect_configuration
|
||||||
|
Loading…
Reference in New Issue
Block a user