summaryrefslogtreecommitdiffstats
path: root/lib/network/connection.pm
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 /lib/network/connection.pm
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
Diffstat (limited to 'lib/network/connection.pm')
-rw-r--r--lib/network/connection.pm7
1 files changed, 7 insertions, 0 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};