summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-29 06:51:32 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-29 06:51:32 +0000
commitcbf1fd8b70ea2a9078e38f0ce50ce274739fe47b (patch)
treea377f8c82843ea51d43bb6e8596c50864950ecbb /perl-install/network/ethernet.pm
parent3a59c5e2447b09360897677dc21d4fdb3bc68038 (diff)
downloaddrakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar
drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.gz
drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.bz2
drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.tar.xz
drakx-cbf1fd8b70ea2a9078e38f0ce50ce274739fe47b.zip
new sysfs structure
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 341e17a36..e20aa0ba4 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -77,11 +77,11 @@ sub get_eth_cards {
# 5) try to match a device through sysfs for driver & device description:
# (eg: ipw2100 driver for intel centrino do not support ETHTOOL)
if (!$description) {
- my $drv = readlink("/sys/class/net/$interface/driver");
+ my $dev_path = "/sys/class/net/$interface/device";
+ my $drv = readlink("$dev_path/driver");
if ($drv && $drv =~ s!.*/!!) {
$a = $drv unless $detected_through_ethtool;
my %l;
- my $dev_path = "/sys/class/net/$interface/device";
my $sysfs_fields = detect_devices::get_sysfs_device_id_map($dev_path);
$l{$_} = hex(chomp_(cat_("$dev_path/" . $sysfs_fields->{$_}))) foreach keys %$sysfs_fields;
my @cards = grep { my $dev = $_; every { $dev->{$_} eq $l{$_} } keys %l } detect_devices::probeall();