summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.com>2008-03-05 20:26:25 +0000
committerOlivier Blin <oblin@mandriva.com>2008-03-05 20:26:25 +0000
commit96dec68926084eb37dce0ef9f451af336526e02b (patch)
tree65cf8c14e6ef97958fbc9000883b7f54ea34140b
parent597396c0f036a9cf423f2cbf7ef17bbb89ded242 (diff)
downloaddrakx-net-96dec68926084eb37dce0ef9f451af336526e02b.tar
drakx-net-96dec68926084eb37dce0ef9f451af336526e02b.tar.gz
drakx-net-96dec68926084eb37dce0ef9f451af336526e02b.tar.bz2
drakx-net-96dec68926084eb37dce0ef9f451af336526e02b.tar.xz
drakx-net-96dec68926084eb37dce0ef9f451af336526e02b.zip
include interface name when selecting device in drakconnect
-rw-r--r--lib/network/connection.pm7
-rw-r--r--lib/network/netconnect.pm2
2 files changed, 8 insertions, 1 deletions
diff --git a/lib/network/connection.pm b/lib/network/connection.pm
index b942881..6415282 100644
--- a/lib/network/connection.pm
+++ b/lib/network/connection.pm
@@ -80,6 +80,13 @@ sub get_description {
$description;
}
+sub get_label {
+ my ($self) = @_;
+ my $intf = $self->get_interface;
+ my $descr = $self->get_description;
+ $intf ? sprintf("%s (%s)", $descr, $intf) : $descr;
+}
+
sub get_driver {
my ($self) = @_;
$self->{device}{driver};
diff --git a/lib/network/netconnect.pm b/lib/network/netconnect.pm
index dc50da6..50c6174 100644
--- a/lib/network/netconnect.pm
+++ b/lib/network/netconnect.pm
@@ -144,7 +144,7 @@ sub real_main {
select_connection => {
name => sub { $net->{type}->get_type_name . "\n\n" . N("Select the network interface to configure:") },
data => [ { val => \$connection, type => 'list', list => \@connections_list,
- format => sub { $_[0] && $_[0]->get_description }, allow_empty_list => 1 } ],
+ format => sub { $_[0] && $_[0]->get_label }, allow_empty_list => 1 } ],
complete => sub {
$connection->setup_thirdparty($in) or return 1;
$connection->prepare_device;