[Ferm] [PATCH] Honor --noflush in fast mode too

Faidon Liambotis paravoid at debian.org
Wed Jul 6 22:58:39 CEST 2011


Currently --noflush is ignored in the (default) fast mode and only
honored in slow mode. Fix this by passing --noflush to
ip(6)tables-restore in such a case.
---
 src/ferm |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)

diff --git a/src/ferm b/src/ferm
index 626eb85..6dcd24f 100755
--- a/src/ferm
+++ b/src/ferm
@@ -2329,6 +2329,7 @@ sub restore_domain($$) {
     my ($domain_info, $save) = @_;
 
     my $path = $domain_info->{tools}{'tables-restore'};
+    $path .= " --noflush" if $option{noflush};
 
     local *RESTORE;
     open RESTORE, "|$path"
@@ -2346,7 +2347,9 @@ sub execute_fast($) {
     my $save = rules_to_save($domain_info);
 
     if ($option{lines}) {
-        print LINES "$domain_info->{tools}{'tables-restore'} <<EOT\n"
+        my $path = $domain_info->{tools}{'tables-restore'};
+        $path .= " --noflush" if $option{noflush};
+        print LINES "$path <<EOT\n"
           if $option{shell};
         print LINES $save;
         print LINES "EOT\n"
-- 
1.7.2.5



More information about the Ferm mailing list