summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThierry Vignaud <tvignaud@mandriva.org>2004-03-17 13:25:38 +0000
committerThierry Vignaud <tvignaud@mandriva.org>2004-03-17 13:25:38 +0000
commite0ddbaab310e98ca4486d1f2ef053f12d46f53ed (patch)
treec6fbec283d8ca2346a84ed736a29191a2a8b998a
parentba4e8886d6cdfe3e8d8b8303ed8b78010f7d30fa (diff)
downloaddrakx-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar
drakx-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.gz
drakx-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.bz2
drakx-e0ddbaab310e98ca4486d1f2ef053f12d46f53ed.tar.xz
drakx-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)
-rwxr-xr-xperl-install/standalone/drakconnect11
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);