summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2004-07-20 15:00:30 +0000
committerOlivier Blin <oblin@mandriva.org>2004-07-20 15:00:30 +0000
commit95f74df604483af6520bcb69bbfa48a030793226 (patch)
tree3c244898ab0e426eae418c16996d81956dec58d9
parentc4bc3ce434c4d352391ba8618fdfec4c123cc3c1 (diff)
downloaddrakx-95f74df604483af6520bcb69bbfa48a030793226.tar
drakx-95f74df604483af6520bcb69bbfa48a030793226.tar.gz
drakx-95f74df604483af6520bcb69bbfa48a030793226.tar.bz2
drakx-95f74df604483af6520bcb69bbfa48a030793226.tar.xz
drakx-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)
-rw-r--r--perl-install/network/netconnect.pm24
-rw-r--r--perl-install/network/tools.pm3
-rwxr-xr-xperl-install/standalone/drakconnect2
-rwxr-xr-xperl-install/standalone/net_monitor3
4 files changed, 15 insertions, 17 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 {
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index aae98c90d..3e2dbaee7 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -191,9 +191,8 @@ sub is_dynamic_host {
sub reread_net_conf {
my ($netcnx, $netc, $intf) = @_;
- network::netconnect::read_net_conf('', $netcnx, $netc);
+ network::netconnect::read_net_conf($netcnx, $netc, $intf);
modules::load_category('net');
- network::netconnect::load_conf($netcnx, $netc, $intf);
}
sub convert_wep_key_for_iwconfig {
diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect
index 5922ca50e..cfe9647c7 100755
--- a/perl-install/standalone/drakconnect
+++ b/perl-install/standalone/drakconnect
@@ -633,7 +633,7 @@ sub check_field {
sub add_intf() {
$::isWizard = 1;
- network::netconnect::load_conf($netcnx, $netc, $intf);
+ network::netconnect::read_net_conf($netcnx, $netc, $intf);
# network::netconnect::add_interface($in, $netcnx);
network::netconnect::main('', $netcnx, $in, $netc, undef, $intf);
$in->exit(0);
diff --git a/perl-install/standalone/net_monitor b/perl-install/standalone/net_monitor
index 7c6827aaa..8116be919 100755
--- a/perl-install/standalone/net_monitor
+++ b/perl-install/standalone/net_monitor
@@ -82,8 +82,7 @@ my $arrow_size = 5;
my $use_same_scale = 1;
-network::netconnect::load_conf($netcnx, $netc, $intf);
-network::netconnect::read_net_conf('', $netcnx, $netc);
+network::netconnect::read_net_conf($netcnx, $netc, $intf);
MDK::Common::Globals::init(in => $in);
gtkadd($window1->{window},