mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-25 09:03:30 +01:00
Correct a couple of problems with -C
Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
8fb73026c8
commit
9598ac6fad
@ -493,7 +493,7 @@ save_config() {
|
|||||||
|
|
||||||
[ -x $iptables_save ] || echo "$iptables-save does not exist or is not executable" >&2
|
[ -x $iptables_save ] || echo "$iptables-save does not exist or is not executable" >&2
|
||||||
|
|
||||||
[ -n "$g_counters" iptables_save="$iptables_save --counters"
|
[ -n "$g_counters" ] && iptables_save="$iptables_save --counters"
|
||||||
|
|
||||||
if product_is_started ; then
|
if product_is_started ; then
|
||||||
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
[ -d ${VARDIR} ] || mkdir -p ${VARDIR}
|
||||||
@ -3122,6 +3122,8 @@ save_command() {
|
|||||||
local finished
|
local finished
|
||||||
finished=0
|
finished=0
|
||||||
|
|
||||||
|
shift
|
||||||
|
|
||||||
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||||
option=$1
|
option=$1
|
||||||
case $option in
|
case $option in
|
||||||
@ -3152,10 +3154,10 @@ save_command() {
|
|||||||
done
|
done
|
||||||
|
|
||||||
case $# in
|
case $# in
|
||||||
1)
|
0)
|
||||||
;;
|
;;
|
||||||
2)
|
1)
|
||||||
RESTOREFILE="$2"
|
RESTOREFILE="$1"
|
||||||
validate_restorefile '<restore file>'
|
validate_restorefile '<restore file>'
|
||||||
;;
|
;;
|
||||||
*)
|
*)
|
||||||
|
@ -8243,7 +8243,7 @@ sub create_netfilter_load( $ ) {
|
|||||||
'# Create the input to iptables-restore/ip6tables-restore and pass that input to the utility',
|
'# Create the input to iptables-restore/ip6tables-restore and pass that input to the utility',
|
||||||
'#',
|
'#',
|
||||||
'setup_netfilter()',
|
'setup_netfilter()',
|
||||||
'{'.
|
'{',
|
||||||
' local option',
|
' local option',
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -8309,8 +8309,8 @@ sub create_netfilter_load( $ ) {
|
|||||||
# SHA1SUM chains for handling 'restart -s'
|
# SHA1SUM chains for handling 'restart -s'
|
||||||
#
|
#
|
||||||
if ( $table eq 'filter' ) {
|
if ( $table eq 'filter' ) {
|
||||||
emit_unindented ':$shasum1 - [0:0]';
|
emit_unindented ':$g_sha1sum1 - [0:0]';
|
||||||
emit_unindented ':$shasum2 - [0:0]';
|
emit_unindented ':$g_sha1sum2 - [0:0]';
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user