diff options
author | Olivier Blin <oblin@mandriva.org> | 2004-07-20 15:00:30 +0000 |
---|---|---|
committer | Olivier Blin <oblin@mandriva.org> | 2004-07-20 15:00:30 +0000 |
commit | 95f74df604483af6520bcb69bbfa48a030793226 (patch) | |
tree | 3c244898ab0e426eae418c16996d81956dec58d9 /perl-install/network/netconnect.pm | |
parent | c4bc3ce434c4d352391ba8618fdfec4c123cc3c1 (diff) | |
download | drakx-backup-do-not-use-95f74df604483af6520bcb69bbfa48a030793226.tar drakx-backup-do-not-use-95f74df604483af6520bcb69bbfa48a030793226.tar.gz drakx-backup-do-not-use-95f74df604483af6520bcb69bbfa48a030793226.tar.bz2 drakx-backup-do-not-use-95f74df604483af6520bcb69bbfa48a030793226.tar.xz drakx-backup-do-not-use-95f74df604483af6520bcb69bbfa48a030793226.zip |
merge netconnect::load_conf in netconnect::read_conf (and replace all calls to lload_conf with read_conf, remove all previous calls to read_conf)
Diffstat (limited to 'perl-install/network/netconnect.pm')
-rw-r--r-- | perl-install/network/netconnect.pm | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 15a5a7a8b..2fb9fbdfa 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -261,7 +261,8 @@ sub real_main { data => \@connection_list, post => sub { $is_wireless = $cnx_type eq N("Wireless connection"); - load_conf($netcnx, $netc, $intf) if $::isInstall; # :-( + #- why read again the net_conf here ? + read_net_conf($netcnx, $netc, $intf) if $::isInstall; # :-( $type = $netcnx->{type} = $connections{$cnx_type}; if ($type eq 'cable') { $auto_ip = 1; @@ -1373,14 +1374,6 @@ sub get_profiles() { map { if_(m!([^/]*)/$!, $1) } glob("$::prefix/etc/netprofile/profiles/*/"); } -sub load_conf { - my ($netcnx, $netc, $intf) = @_; - my $current = { getVarsFromSh("$::prefix/etc/netprofile/current") }; - - $netcnx->{PROFILE} = $current->{PROFILE} || 'default'; - network::network::read_all_conf($::prefix, $netc, $intf, $netcnx); -} - sub get_net_device() { my $connect_file = $network::tools::connect_file; my $network_file = "$::prefix/etc/sysconfig/network"; @@ -1396,9 +1389,16 @@ sub get_net_device() { } sub read_net_conf { - my (undef, $netcnx, $netc) = @_; - $netc->{$_} = $netcnx->{$_} foreach 'NET_DEVICE', 'NET_INTERFACE'; - $netcnx->{$netcnx->{type}} ||= {}; + my ($netcnx, $netc, $intf) = @_; + my $current = { getVarsFromSh("$::prefix/etc/netprofile/current") }; + + $netcnx->{PROFILE} = $current->{PROFILE} || 'default'; + network::network::read_all_conf($::prefix, $netc, $intf, $netcnx); + + foreach ('NET_DEVICE', 'NET_INTERFACE') { + $netc->{$_} = $netcnx->{$_} if $netcnx->{$_} + } + $netcnx->{$netcnx->{type}} ||= {} if $netcnx->{type}; } sub start_internet { |