summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-09-03 06:01:39 +0000
committerOlivier Blin <oblin@mandriva.org>2004-09-03 06:01:39 +0000
commita0041a1aebdae0d5042f3c1e156f541275cb1b61 (patch)
tree4c351bc63e2b01b8b6845b804ee381e1b91ee51e
parentd08ae128c6ccefb284fd148064d1a77e4a83db63 (diff)
downloaddrakx-a0041a1aebdae0d5042f3c1e156f541275cb1b61.tar
drakx-a0041a1aebdae0d5042f3c1e156f541275cb1b61.tar.gz
drakx-a0041a1aebdae0d5042f3c1e156f541275cb1b61.tar.bz2
drakx-a0041a1aebdae0d5042f3c1e156f541275cb1b61.tar.xz
drakx-a0041a1aebdae0d5042f3c1e156f541275cb1b61.zip
(findIntf, read_all_conf) use default DEVICE field only at last
ressort, keep weird DEVICE fiels (i.e for sagem)
-rw-r--r--perl-install/network/network.pm10
1 files changed, 6 insertions, 4 deletions
diff --git a/perl-install/network/network.pm b/perl-install/network/network.pm
index 0277dc1eb..6e7d2afff 100644
--- a/perl-install/network/network.pm
+++ b/perl-install/network/network.pm
@@ -231,7 +231,7 @@ sub dnsServers {
sub findIntf {
my ($intf, $device) = @_;
- $intf->{$device}{DEVICE} = $device;
+ $intf->{$device}{DEVICE} = undef;
$intf->{$device};
}
@@ -338,10 +338,12 @@ sub read_all_conf {
add2hash($netc, read_resolv_conf());
add2hash($netc, read_tmdns_conf());
foreach (all("$::prefix/etc/sysconfig/network-scripts")) {
- if (/^ifcfg-([A-Za-z0-9.:]+)$/ && $1 ne 'lo') {
- my $intf = findIntf($intf, $1);
+ my ($device) = /^ifcfg-([A-Za-z0-9.:]+)$/;
+ if ($device && $device ne 'lo') {
+ my $intf = findIntf($intf, $device);
add2hash($intf, { getVarsFromSh("$::prefix/etc/sysconfig/network-scripts/$_") });
- $intf->{WIRELESS_ENC_KEY} = network::tools::get_wep_key_from_iwconfig($intf->{WIRELESS_ENC_KEY});
+ $intf->{DEVICE} ||= $device;
+ $intf->{WIRELESS_ENC_KEY} = network::tools::get_wep_key_from_iwconfig($intf->{WIRELESS_ENC_KEY});
}
}
$netcnx->{type} or probe_netcnx_type($::prefix, $netc, $intf, $netcnx);