summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2002-11-25 18:06:40 +0000
committerFrancois Pons <fpons@mandriva.com>2002-11-25 18:06:40 +0000
commit8bf8db14d0e0b94e054c06018cab1b0141ebf973 (patch)
tree093f2a3aeeb29763072a5021744fe69f2485cae3 /perl-install/network/ethernet.pm
parenta40bceec1a004b6cc56da740518582138b6c7c96 (diff)
downloaddrakx-backup-do-not-use-8bf8db14d0e0b94e054c06018cab1b0141ebf973.tar
drakx-backup-do-not-use-8bf8db14d0e0b94e054c06018cab1b0141ebf973.tar.gz
drakx-backup-do-not-use-8bf8db14d0e0b94e054c06018cab1b0141ebf973.tar.bz2
drakx-backup-do-not-use-8bf8db14d0e0b94e054c06018cab1b0141ebf973.tar.xz
drakx-backup-do-not-use-8bf8db14d0e0b94e054c06018cab1b0141ebf973.zip
removed 2 labels and 2 gotos by a very simple while, dam's is really great
sometimes ;-)
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm11
1 files changed, 5 insertions, 6 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index 97d368843..9b4a12643 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -87,14 +87,13 @@ sub conf_network_card {
my $interface;
@all_cards == () and $in->ask_warn('', N("No ethernet network adapter has been detected on your system.
I cannot set up this connection type.")) and return;
- @all_cards == 1 and $interface = $all_cards[0][0] and goto l1;
- again:
+ @all_cards == 1 and $interface = $all_cards[0][0];
+ while (!$interface) {
$interface = $in->ask_from_list(N("Choose the network interface"),
N("Please choose which network adapter you want to use to connect to Internet"),
[ map { $_->[0] . ($_->[1] ? " (using module $_->[1])" : "") } @all_cards ]
) or return;
- defined $interface or goto again;
- l1:
+ }
$::isStandalone and modules::write_conf($prefix);
my $device = conf_network_card_backend($netc, $intf, $type, $interface, $ipadr, $netadr, $interface);
@@ -145,11 +144,11 @@ sub conf_network_card_backend {
$_->{device} eq $interface and $b = $_->{driver};
}
$a ||= $b;
- if ($a) { $saved_driver = $a }
+ $a and $saved_driver = $a;
[$interface, $saved_driver];
} @all_cards;
}
- my ($device) = $interface =~ /(eth[0-9]+)/ or die("the interface is not an ethx");
+ my ($device) = $interface =~ /(ADIModem|eth[0-9]+)/ or die("the interface is not an ethx or other (like ADIModem)");
$netc->{NET_DEVICE} = $device; #- one consider that there is only ONE Internet connection device..
@{$intf->{$device}}{qw(DEVICE BOOTPROTO NETMASK NETWORK ONBOOT)} =