forked from ports/contrib
27 lines
865 B
Diff
27 lines
865 B
Diff
diff --git a/ebtables-save.in b/ebtables-save.in
|
|
index 17924a2..c7a64c3 100644
|
|
--- a/ebtables-save.in
|
|
+++ b/ebtables-save.in
|
|
@@ -12,6 +12,7 @@ my $ebtables = "@sbindir@/ebtables";
|
|
my $cnt = "";
|
|
my $version = "1.0";
|
|
my $table_name;
|
|
+my @table_names;
|
|
|
|
# ========================================================
|
|
# Process filter table
|
|
@@ -49,6 +50,13 @@ sub process_table {
|
|
}
|
|
# ========================================================
|
|
|
|
+if ($#ARGV + 1 == 0) {
|
|
+ @table_names =split("\n", `grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//`);
|
|
+}
|
|
+else {
|
|
+ @table_names = @ARGV;
|
|
+}
|
|
+# ========================================================
|
|
unless (-x $ebtables) { exit -1 };
|
|
print "# Generated by ebtables-save v$version (legacy) on " . `date`;
|
|
if (defined($ENV{'EBTABLES_SAVE_COUNTER'}) && $ENV{'EBTABLES_SAVE_COUNTER'} eq "yes") {
|