diff --git a/net/debian-linux-lib.pl b/net/debian-linux-lib.pl index 10a4bd0b2..07a8ff499 100755 --- a/net/debian-linux-lib.pl +++ b/net/debian-linux-lib.pl @@ -233,7 +233,9 @@ foreach $iface (@ifaces) { $found = 1; foreach my $o (@{$iface->[3]}) { if ($o->[0] eq 'gateway' || - $o->[0] eq 'pre-up' && $o->[1] =~ /brctl/) { + $o->[0] eq 'pre-up' && $o->[1] =~ /brctl/ || + $o->[0] =~ /^(pre-)?up$/ && + $o->[1] =~ /ip\s+route/) { push(@options, $o); } } @@ -244,6 +246,9 @@ foreach $iface (@ifaces) { } } +# Remove any duplicate options +@options = grep { !$done{$_->[0],$_->[1]}++ } @options; + if (!$found) { # Add a new interface section if ($in{'vlan'} == 1) {