summaryrefslogtreecommitdiffstats
path: root/perl-install/network
diff options
context:
space:
mode:
authorFlorin Grad <florin@mandriva.com>2004-03-04 11:03:36 +0000
committerFlorin Grad <florin@mandriva.com>2004-03-04 11:03:36 +0000
commit4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca (patch)
treef422b12b958208724fed16071ffbce0cb84d529e /perl-install/network
parent5b2629ae80194fea530e756bd61792144d8bd488 (diff)
downloaddrakx-4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca.tar
drakx-4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca.tar.gz
drakx-4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca.tar.bz2
drakx-4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca.tar.xz
drakx-4ded14562d01fe6bc2b1558ebbc28e1b90bcc3ca.zip
use the name of the network interface instead of the label
Diffstat (limited to 'perl-install/network')
-rw-r--r--perl-install/network/shorewall.pm10
1 files changed, 8 insertions, 2 deletions
diff --git a/perl-install/network/shorewall.pm b/perl-install/network/shorewall.pm
index 59e6a761a..8a0cf6e96 100644
--- a/perl-install/network/shorewall.pm
+++ b/perl-install/network/shorewall.pm
@@ -5,6 +5,7 @@ package network::shorewall; # $Id$
use detect_devices;
use network::netconnect;
+use network::ethernet;
use run_program;
use common;
use log;
@@ -66,15 +67,20 @@ sub default_interfaces {
defined $card_netconnect and log::l("[drakgw] Information from netconnect: ignore card $card_netconnect");
my @l = detect_devices::getNet() or return;
+
+my @all_cards = network::ethernet::get_eth_cards();
+my %net_devices = network::ethernet::get_eth_cards_names(@all_cards);
+
$in->ask_from('',
- N("Please enter the name of the interface connected to the internet.
+ N("Please enter the name of the interface connected to the internet.
Examples:
ppp+ for modem or DSL connections,
eth0, or eth1 for cable connection,
ippp+ for a isdn connection.
"),
- [ { label => N("Net Device"), val => \$card_netconnect, list => \@l } ]);
+ [ { 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{net_interface} = network::netconnect::get_net_device() || $l[0];
$conf{loc_interface} = [ grep { $_ ne $conf{net_interface} } @l ];