summaryrefslogtreecommitdiffstats
path: root/perl-install/network/ethernet.pm
diff options
context:
space:
mode:
authorFrancois Pons <fpons@mandriva.com>2003-03-04 15:14:11 +0000
committerFrancois Pons <fpons@mandriva.com>2003-03-04 15:14:11 +0000
commita7dec2b7d45d2b9fa1acc8b72d9dd87987168413 (patch)
treec7081e1e3ae58cf02218e5dc4bd46d3829f189f1 /perl-install/network/ethernet.pm
parent424776d0e25f41eb3f7707e197a654f675beb26b (diff)
downloaddrakx-a7dec2b7d45d2b9fa1acc8b72d9dd87987168413.tar
drakx-a7dec2b7d45d2b9fa1acc8b72d9dd87987168413.tar.gz
drakx-a7dec2b7d45d2b9fa1acc8b72d9dd87987168413.tar.bz2
drakx-a7dec2b7d45d2b9fa1acc8b72d9dd87987168413.tar.xz
drakx-a7dec2b7d45d2b9fa1acc8b72d9dd87987168413.zip
avoid being pertubed by created virtual interface (no inet addre nor
physicall card behing)
Diffstat (limited to 'perl-install/network/ethernet.pm')
-rw-r--r--perl-install/network/ethernet.pm6
1 files changed, 3 insertions, 3 deletions
diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm
index c7a7d1a92..a213ba65d 100644
--- a/perl-install/network/ethernet.pm
+++ b/perl-install/network/ethernet.pm
@@ -126,13 +126,13 @@ sub conf_network_card_backend {
#-type =static or dhcp
if (!$interface) {
my @all_cards = detect_devices::getNet();
- my @unconfigured_interfaces = qw(ADIModem);
my @devs = detect_devices::pcmcia_probe();
modules::mergein_conf("$prefix/etc/modules.conf");
my $saved_driver;
return map {
my $interface = $_;
+ my $interface_state = `LC_ALL=C LANG=C LANGUAGE=C LC_MESSAGES=C /sbin/ifconfig "$interface"`;
my $a = modules::get_alias($interface);
my $b;
foreach (@devs) {
@@ -140,10 +140,10 @@ sub conf_network_card_backend {
}
$a ||= $b;
$a and $saved_driver = $a;
- if_(!member($interface, @unconfigured_interfaces) || $a, [$interface, $saved_driver]);
+ if_($interface_state =~ /inet addr|Bcast|Mask|Interrupt|Base address/ && $a, [$interface, $saved_driver]);
} @all_cards, @unconfigured_interfaces;
}
- my ($device) = $interface =~ /(ADIModem|eth[0-9]+)/ or die("the interface is not an ethx or other (like ADIModem)");
+ my ($device) = $interface =~ /eth[0-9]+/ or die("the interface is not an ethx");
$netc->{NET_DEVICE} = $device; #- one consider that there is only ONE Internet connection device..
@{$intf->{$device}}{qw(DEVICE BOOTPROTO NETMASK NETWORK ONBOOT)} = ($device, $type, '255.255.255.0', $netadr, 'yes');