summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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;