summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-12-08 12:45:38 +0000
committerOlivier Blin <oblin@mandriva.org>2005-12-08 12:45:38 +0000
commit448e1389b6a0e34cfd4752b1b65194fd05d514f1 (patch)
treee61f0353c3b90a65846a163a0111751d9dd4cd6b
parentfe109dc5a244ff5ec0d8625934950003bceef7f8 (diff)
downloaddrakx-448e1389b6a0e34cfd4752b1b65194fd05d514f1.tar
drakx-448e1389b6a0e34cfd4752b1b65194fd05d514f1.tar.gz
drakx-448e1389b6a0e34cfd4752b1b65194fd05d514f1.tar.bz2
drakx-448e1389b6a0e34cfd4752b1b65194fd05d514f1.tar.xz
drakx-448e1389b6a0e34cfd4752b1b65194fd05d514f1.zip
fix default metric setting for wifi interfaces (thanks to Mickaƫl Le Baillif for pointing this out)
-rw-r--r--perl-install/network/netconnect.pm5
-rw-r--r--perl-install/network/tools.pm5
2 files changed, 5 insertions, 5 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 214d91abe..adf6d9a9c 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -884,9 +884,8 @@ If you do not know it, keep the preselected type."),
{
pre => sub {
$find_lan_module->();
- my $intf_type = member($module, list_modules::category2modules('network/gigabit')) ? "ethernet_gigabit" : "ethernet";
- defined($ethntf->{METRIC}) or $ethntf->{METRIC} = network::tools::get_default_metric($intf_type);
-
+ $ethntf->{METRIC} = network::tools::get_default_metric(network::tools::get_interface_type($ethntf, $module))
+ unless defined($ethntf->{METRIC});
$protocol = $l10n_lan_protocols{defined $auto_ip ? ($auto_ip ? 'dhcp' : 'static') : $ethntf->{BOOTPROTO}} || 0;
},
name => sub {
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 9445f6a2b..460797959 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -208,13 +208,14 @@ sub get_internet_connection {
}
sub get_interface_type {
- my ($interface) = @_;
+ my ($interface, $o_module) = @_;
require detect_devices;
member($interface->{TYPE}, "xDSL", "ADSL") && "adsl" ||
$interface->{DEVICE} =~ /^ippp/ && "isdn" ||
$interface->{DEVICE} =~ /^ppp/ && "modem" ||
(detect_devices::is_wireless_interface($interface->{DEVICE}) || exists $interface->{WIRELESS_MODE}) && "wifi" ||
- detect_devices::is_lan_interface($interface->{DEVICE}) && "ethernet" ||
+ detect_devices::is_lan_interface($interface->{DEVICE}) &&
+ ($o_module && member($o_module, list_modules::category2modules('network/gigabit')) ? "ethernet_gigabit" : "ethernet") ||
"unknown";
}