diff options
author | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-17 13:25:38 +0000 |
---|---|---|
committer | Thierry Vignaud <tvignaud@mandriva.org> | 2004-03-17 13:25:38 +0000 |
commit | e0ddbaab310e98ca4486d1f2ef053f12d46f53ed (patch) | |
tree | c6fbec283d8ca2346a84ed736a29191a2a8b998a /perl-install/standalone/drakconnect | |
parent | ba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa (diff) | |
download | drakx-backup-do-not-use-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar drakx-backup-do-not-use-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.gz drakx-backup-do-not-use-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.bz2 drakx-backup-do-not-use-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.xz drakx-backup-do-not-use-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.zip |
fix no information for drivers that do not support ethtool ioctl (eg:
sk98lin): try to match the device by interface name and driver name
(won't work for several cards managed by the same driver)
Diffstat (limited to 'perl-install/standalone/drakconnect')
-rwxr-xr-x | perl-install/standalone/drakconnect | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 3e83aea79..b9fd3e765 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -203,7 +203,8 @@ sub manage { eval(cat_('/etc/sysconfig/drakconnect')); - my %name = network::ethernet::get_eth_cards_names(network::ethernet::get_eth_cards); + @all_cards = network::ethernet::get_eth_cards(); + my %name = network::ethernet::get_eth_cards_names(@all_cards); foreach (keys %name) { $p->{/eth|ath|wlan/ ? $name{$_} : $_} = { kind => $_ }; } @@ -541,6 +542,12 @@ sub build_notebook { if ($intf->{pages}{N("Information")}) { my ($info) = $gui->{description} ? find { $_->{description} eq $gui->{description} } detect_devices::probeall : network::ethernet::mapIntfToDevice($interface_kind); + if (is_empty_hash_ref($info) and my @intfs = grep { $interface_kind eq $_->[0] } @all_cards) { + my $driver; + if ($#intfs == 0 and $driver = $intfs[0][1] and my @cards = grep { $_->{driver} eq $driver } detect_devices::probeall()) { + $info = $cards[0] if $#cards == 0; + } + } gtkpack($gui->{sheet}{N("Information")} = Gtk2::VBox->new(0,0), gtktext_insert(Gtk2::TextView->new, @@ -577,6 +584,7 @@ sub save { foreach (keys %$p) { save_notebook($netc, $p->{$_}{intf}, $p->{$_}{gui}) or return; + print "will run apply()? ", $p->{$_}{intf}{save}, "\n"; $p->{$_}{intf}{save} ? $p->{$_}{intf}{save}->() : apply($netc, $p->{$_}{intf}); } @@ -696,6 +704,7 @@ sub update_list() { sub apply { my ($netc, $intf) = @_; + print "GOTCHA\n"; my $dyn = $intf->{BOOTPROTO} ne 'static'; my $lintf = $intf; $dyn and $lintf->{$_} = undef foreach qw(NETMASK NETWORK IPADDR); |