From c091eb3a32eceba141d5197fae1f1f64090917f5 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 24 Jan 2004 16:13:52 +0000 Subject: factorize lan module search for adsl through ethernet --- perl-install/network/netconnect.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index b61192287..585588dba 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -144,6 +144,8 @@ sub get_subwizard { modules::add_alias($card->[0], $card->[1]); } }; + + my $find_lan_module = sub { $module ||= (find { $_->[0] eq $ethntf->{DEVICE} } @all_cards)->[1] }; my %adsl_devices = ( speedtouch => N("Alcatel speedtouch USB modem"), @@ -690,7 +692,7 @@ Modifying the fields below will override this configuration."), lan_protocol => { pre => sub { - $module ||= (find { $_->[0] eq $ethntf->{DEVICE} } @all_cards)->[1]; + $find_lan_module->(); $auto_ip = $l10n_lan_protocols{defined $auto_ip ? ($auto_ip ? 'dhcp' : 'static') :$ethntf->{BOOTPROTO}} || 0; }, name => sub { -- cgit v1.2.1