From 5892fbd160a966c8a062516f52060ac2bec03505 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Tue, 29 Apr 2008 21:24:02 +0000 Subject: make modules_conf optional when finding interface driver --- lib/network/connection/ethernet.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lib/network/connection/ethernet.pm') diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 0c9f3c1..81592e1 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -394,7 +394,7 @@ sub interface_to_driver { # - hotplug managed devices (USB, firewire) # - special interfaces (IP aliasing, VLAN) sub get_eth_cards { - my ($modules_conf) = @_; + my ($o_modules_conf) = @_; detect_devices::probeall_update_cache(); my @all_cards = detect_devices::get_lan_interfaces(); @@ -410,9 +410,9 @@ sub get_eth_cards { $a = c::getNetDriver($interface); if ($a) { $detected_through_ethtool = 1; - } else { + } elsif ($o_modules_conf) { # 2) get interface's driver through module aliases: - $a = $modules_conf->get_alias($interface); + $a = $o_modules_conf->get_alias($interface); } # workaround buggy drivers that returns a bogus driver name for the GDRVINFO command of the ETHTOOL ioctl: -- cgit v1.2.1