summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-08-31 12:50:12 +0000
committerOlivier Blin <oblin@mandriva.org>2005-08-31 12:50:12 +0000
commitd8018ccf6109b806c800bc45e8bd33a02cb4b15c (patch)
tree608653e5496785f72502289359c718a39e78c8df /perl-install/network
parent5dcf8df512e9a858d4b42d5e362ab9dc3850d93c (diff)
downloaddrakx-backup-do-not-use-d8018ccf6109b806c800bc45e8bd33a02cb4b15c.tar
drakx-backup-do-not-use-d8018ccf6109b806c800bc45e8bd33a02cb4b15c.tar.gz
drakx-backup-do-not-use-d8018ccf6109b806c800bc45e8bd33a02cb4b15c.tar.bz2
drakx-backup-do-not-use-d8018ccf6109b806c800bc45e8bd33a02cb4b15c.tar.xz
drakx-backup-do-not-use-d8018ccf6109b806c800bc45e8bd33a02cb4b15c.zip
move is_ifplugd_blacklist in network::ethernet (and get rid of madwifi_pci, it's wifi and supported by ifplugd)
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/ethernet.pm5
-rw-r--r--perl-install/network/netconnect.pm6
2 files changed, 7 insertions, 4 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 2ac3a4986..c148c9a1e 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -142,4 +142,9 @@ sub configure_eth_aliases {
$::isStandalone and $modules_conf->write;
}
+sub is_ifplugd_blacklisted {
+ my ($module) = @_;
+ member($module, qw(b44 forcedeth via-velocity));
+}
+
1;
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm
index 19db78127..ae85c7e97 100644
--- a/perl-install/network/netconnect.pm
+++ b/perl-install/network/netconnect.pm
@@ -111,8 +111,6 @@ sub real_main {
} else { $module = "" }
};
- my $is_ifplugd_blacklisted = sub { member($module, qw(b44 forcedeth madwifi_pci via-velocity)) };
-
my %adsl_descriptions = (
speedtouch => N("Alcatel speedtouch USB modem"),
sagem => N("Sagem USB modem"),
@@ -721,7 +719,7 @@ If you do not know it, keep the preselected type."),
$net->{type} = 'adsl';
# blacklist bogus driver, enable ifplugd support else:
$find_lan_module->();
- $ethntf->{MII_NOT_SUPPORTED} ||= bool2yesno($is_ifplugd_blacklisted->());
+ $ethntf->{MII_NOT_SUPPORTED} ||= bool2yesno(network::ethernet::is_ifplugd_blacklisted($module));
if ($ntf_name eq "sagem" && member($net->{adsl}{method}, qw(static dhcp))) {
#- "fctStartAdsl -i" builds ifcfg-ethX from ifcfg-sagem and echoes ethX
#- it auto-detects dhcp/static modes thanks to encapsulation setting
@@ -863,7 +861,7 @@ If you do not know it, keep the preselected type."),
$peeryp = $ethntf->{PEERYP} =~ /yes/;
$peerntpd = $ethntf->{PEERNTPD} =~ /yes/;
# blacklist bogus driver, enable ifplugd support else:
- $ifplugd = !text2bool($ethntf->{MII_NOT_SUPPORTED}) && !$is_ifplugd_blacklisted->();
+ $ifplugd = !text2bool($ethntf->{MII_NOT_SUPPORTED}) && !network::ethernet::is_ifplugd_blacklisted($module);
$track_network_id = $::isStandalone && $ethntf->{HWADDR} || detect_devices::isLaptop();
delete $ethntf->{TYPE} if $net->{type} ne 'adsl' || !member($net->{adsl}{method}, qw(static dhcp));
$ethntf->{DHCP_CLIENT} ||= (find { -x "$::prefix/sbin/$_" } qw(dhclient dhcpcd pump dhcpxd));