diff options
author | Olivier Blin <oblin@mandriva.com> | 2008-03-05 21:33:23 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.com> | 2008-03-05 21:33:23 +0000 |
commit | 3c050178362e67c4458f7048306d16706447c0b2 (patch) | |
tree | 73e7563f3ad9ed0b9380711dad07fb4c5846cc26 /lib/network/connection/ethernet.pm | |
parent | 329105c08d86ac3a67cce70ca2f0beaea4285d76 (diff) | |
download | drakx-net-3c050178362e67c4458f7048306d16706447c0b2.tar drakx-net-3c050178362e67c4458f7048306d16706447c0b2.tar.gz drakx-net-3c050178362e67c4458f7048306d16706447c0b2.tar.bz2 drakx-net-3c050178362e67c4458f7048306d16706447c0b2.tar.xz drakx-net-3c050178362e67c4458f7048306d16706447c0b2.zip |
copy device hash not to override descriptions
Diffstat (limited to 'lib/network/connection/ethernet.pm')
-rw-r--r-- | lib/network/connection/ethernet.pm | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/network/connection/ethernet.pm b/lib/network/connection/ethernet.pm index 1e680af..f0ef857 100644 --- a/lib/network/connection/ethernet.pm +++ b/lib/network/connection/ethernet.pm @@ -24,11 +24,9 @@ sub get_unlisted_devices { my ($interfaces, $listed_devices) = @_; my @unlisted_interfaces = sort(difference2($interfaces, [ map { device_to_interface($_) } @$listed_devices ])); map { - interface_to_device($_) || - +{ - description => network::tools::is_virtual_interface($_) ? N("Virtual interface") : $_, - interface => $_ - }; + my %device = %{interface_to_device($_) || +{ interface => $_, description => $_ }}; + $device{description} = N("Virtual interface") if network::tools::is_virtual_interface($_); + \%device; } @unlisted_interfaces; } |