summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2005-01-20 17:46:53 +0000
committerPascal Rigaux <pixel@mandriva.com>2005-01-20 17:46:53 +0000
commit8422bcac45a35c455210e14b0210514de0218a91 (patch)
treecd5205868f59be7673e84aa366d9a3c32b414e24
parentc58d0d8d768abdebd6345f675b11c11fcf58c995 (diff)
downloaddrakx-8422bcac45a35c455210e14b0210514de0218a91.tar
drakx-8422bcac45a35c455210e14b0210514de0218a91.tar.gz
drakx-8422bcac45a35c455210e14b0210514de0218a91.tar.bz2
drakx-8422bcac45a35c455210e14b0210514de0218a91.tar.xz
drakx-8422bcac45a35c455210e14b0210514de0218a91.zip
restore previous network::ethernet::get_eth_cards_names() behaviour
(i got hit by { map ... }; being a block and not a hash ref)
-rw-r--r--perl-install/network/ethernet.pm2
-rw-r--r--perl-install/network/shorewall.pm6
-rwxr-xr-xperl-install/standalone/drakconnect12
3 files changed, 10 insertions, 10 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 66562b5ed..84d828a41 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -96,7 +96,7 @@ sub get_eth_cards {
sub get_eth_cards_names {
my (@all_cards) = @_;
- +{ map { $_->[0] => join(': ', $_->[0], $_->[2]) } @all_cards };
+ map { $_->[0] => join(': ', $_->[0], $_->[2]) } @all_cards;
}
#- returns (link_type, mac_address)
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 9c9628635..9a313ec3a 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -68,8 +68,8 @@ sub default_interfaces {
my $modules_conf = modules::any_conf->read;
my @all_cards = network::ethernet::get_eth_cards($modules_conf);
- my $net_devices = network::ethernet::get_eth_cards_names(@all_cards);
- put_in_hash($net_devices, { 'ppp+' => 'ppp+', 'ippp+' => 'ippp+' });
+ my %net_devices = network::ethernet::get_eth_cards_names(@all_cards);
+ put_in_hash(\%net_devices, { 'ppp+' => 'ppp+', 'ippp+' => 'ippp+' });
$in->ask_from('',
N("Please enter the name of the interface connected to the internet.
@@ -79,7 +79,7 @@ Examples:
eth0, or eth1 for cable connection,
ippp+ for a isdn connection.
"),
- [ { label => N("Net Device"), val => \$card_netconnect, list => [ sort keys %$net_devices ], format => sub { $net_devices->{$_[0]} || $_[0] }, not_edit => 0 } ]);
+ [ { label => N("Net Device"), val => \$card_netconnect, list => [ sort keys %net_devices ], format => sub { $net_devices{$_[0]} || $_[0] }, not_edit => 0 } ]);
$conf{net_interface} = $card_netconnect;
$conf{loc_interface} = [ grep { $_ ne $conf{net_interface} } @l ];
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 83591a46a..742e43c01 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -202,16 +202,16 @@ sub manage {
$notebook->set_property('show-border', 0);
@all_cards = network::ethernet::get_eth_cards($modules_conf);
- my $names = network::ethernet::get_eth_cards_names(@all_cards);
- foreach (keys %$names) {
- my $dev = /eth|ath|wlan/ ? $names->{$_} : $_;
+ my %names = network::ethernet::get_eth_cards_names(@all_cards);
+ foreach (keys %names) {
+ my $dev = /eth|ath|wlan/ ? $names{$_} : $_;
$p->{$dev} = {
name => $_ ,
intf => $intf->{$_}
};
}
while (my ($device, $interface) = each %$intf) {
- exists $names->{$device} and next;
+ exists $names{$device} and next;
my $type = network::tools::get_interface_type($interface);
$p->{"$type ($device)"} = {
name => $device,
@@ -671,7 +671,7 @@ sub del_intf() {
$in->exit(0);
}
@all_cards = network::ethernet::get_eth_cards($modules_conf);
- my $ethernet_names = network::ethernet::get_eth_cards_names(@all_cards);
+ my %ethernet_names = network::ethernet::get_eth_cards_names(@all_cards);
my $wiz =
{
defaultimage => "drakconnect.png",
@@ -684,7 +684,7 @@ sub del_intf() {
list => [ keys %$intf ],
format => sub {
my $type = network::tools::get_interface_type($intf->{$_[0]});
- $ethernet_names->{$_[0]} || ($type ? "$type ($_[0])" : $_[0])
+ $ethernet_names{$_[0]} || ($type ? "$type ($_[0])" : $_[0])
}
}
],