From c9ccb71c94fd6a042bd354f874c685831d0448d3 Mon Sep 17 00:00:00 2001 From: damien Date: Wed, 4 Jul 2001 19:18:55 +0000 Subject: updated CVS: ---------------------------------------------------------------------- --- perl-install/network/adsl.pm | 2 +- perl-install/network/ethernet.pm | 3 ++- perl-install/network/isdn.pm | 2 +- perl-install/network/modem.pm | 2 +- perl-install/network/netconnect.pm | 17 ++++++++++------- perl-install/network/tools.pm | 2 +- 6 files changed, 16 insertions(+), 12 deletions(-) (limited to 'perl-install') diff --git a/perl-install/network/adsl.pm b/perl-install/network/adsl.pm index 40e698a9b..03f6aade7 100644 --- a/perl-install/network/adsl.pm +++ b/perl-install/network/adsl.pm @@ -6,7 +6,7 @@ use network::tools; use network::ethernet; use vars qw(@ISA @EXPORT); -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(adsl_ask_info adsl_detect adsl_conf adsl_conf_backend); diff --git a/perl-install/network/ethernet.pm b/perl-install/network/ethernet.pm index 24d916c65..e3dc4bf9f 100644 --- a/perl-install/network/ethernet.pm +++ b/perl-install/network/ethernet.pm @@ -6,7 +6,7 @@ use any; use detect_devices; use common qw(:file); use vars qw(@ISA @EXPORT); -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(conf_network_card conf_network_card_backend go_ethernet); @@ -49,6 +49,7 @@ Default is dhcpcd"), sub configure_lan { my ($netcnx, $netc, $intf, $first_time) = @_; $::isInstall and $in->set_help('configureNetworkIP'); + print "plop2 ------------ $in ----------- \n"; require Data::Dumper; print "plop :" . Data::Dumper->Dump([\$in], ['$in']) . "\n"; network::configureNetwork($prefix, $netc, $in, $intf, $first_time) or return; diff --git a/perl-install/network/isdn.pm b/perl-install/network/isdn.pm index 30ae495e5..39a9ac820 100644 --- a/perl-install/network/isdn.pm +++ b/perl-install/network/isdn.pm @@ -6,7 +6,7 @@ use modules; use log; use network::tools; use vars qw(@ISA @EXPORT); -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(isdn_write_config isdn_write_config_backend get_info_providers_backend isdn_ask_info isdn_ask_protocol isdn_ask isdn_detect isdn_detect_backend isdn_get_list isdn_get_info); diff --git a/perl-install/network/modem.pm b/perl-install/network/modem.pm index 024c0f70b..8f281922c 100644 --- a/perl-install/network/modem.pm +++ b/perl-install/network/modem.pm @@ -7,7 +7,7 @@ use detect_devices; use mouse; use network::tools; use vars qw(@ISA @EXPORT); -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(pppConfig modem_detect_backend); diff --git a/perl-install/network/netconnect.pm b/perl-install/network/netconnect.pm index 001fb4698..52fd398d0 100644 --- a/perl-install/network/netconnect.pm +++ b/perl-install/network/netconnect.pm @@ -18,7 +18,7 @@ use commands; #require Data::Dumper; use network::tools; -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); $connect_file = "/etc/sysconfig/network-scripts/net_cnx_up"; $disconnect_file = "/etc/sysconfig/network-scripts/net_cnx_down"; @@ -26,12 +26,11 @@ $connect_prog = "/etc/sysconfig/network-scripts/net_cnx_pg"; #- intro is called only in standalone. sub intro { - (my $prefix, my $netcnx, my $in, my $install) = @_; - globals::init(in => $in, prefix => $prefix, install => $install); + my ($prefix, $netcnx, $in, $install) = @_; my ($netc, $mouse, $intf) = ({}, {}, {}); my $text; my $connected; - read_net_conf($netcnx, $netc); + read_net_conf($prefix, $netcnx, $netc); if (!$::isWizard) { if (connected($netc)) { $text=_("You are currently connected to internet.") . (-e $disconnect_file ? _("\nYou can disconnect or reconfigure your connection.") : _("\nYou can reconfigure your connection.")); @@ -85,7 +84,7 @@ sub detect { } sub main { - (my $prefix, my $netcnx, my $netc, my $mouse, my $in, my $intf, my $install, my $first_time, my $direct_fr) = @_; + my ($prefix, $netcnx, $netc, $mouse, $in, $intf, $install, $first_time, $direct_fr) = @_; globals::init(in => $in, prefix => $prefix, install => $install); $netc->{minus_one}=0; #When one configure an eth in dhcp without gateway $::isInstall and $in->set_help('configureNetwork'); @@ -167,7 +166,11 @@ ifdown eth0 $conf{isdn} and do { require network::isdn; network::isdn::configure($netcnx, $netc) or goto step_2 }; $conf{adsl} and do { require network::adsl; network::adsl::configure($netcnx, $netc, $intf, $first_time) or goto step_2 }; $conf{cable} and do { require network::ethernet; network::ethernet::configure_cable($netcnx, $netc, $intf, $first_time) or goto step_2 }; - $conf{lan} and do { require network::ethernet; network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2 }; + $conf{lan} and do { + print "plop2 ------------ $in ----------- \n"; +require network::ethernet; + print "plop3 ------------ $in ----------- \n"; +network::ethernet::configure_lan($netcnx, $netc, $intf, $first_time) or goto step_2 }; step_3: @@ -483,7 +486,7 @@ sub get_net_device { } sub read_net_conf { - my ($netcnx, $netc)=@_; + my ($prefix, $netcnx, $netc)=@_; add2hash($netcnx, { getVarsFromSh("$prefix/etc/sysconfig/draknet") }); $netc->{$_} = $netcnx->{$_} foreach 'NET_DEVICE', 'NET_INTERFACE'; #- print "type : $netcnx->{type}\n device : $netcnx->{NET_DEVICE}\n interface : $netcnx->{NET_INTERFACE}\n"; diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm index f9967c7b3..284f89bda 100644 --- a/perl-install/network/tools.pm +++ b/perl-install/network/tools.pm @@ -3,7 +3,7 @@ package network::tools; use common qw(:common :file); use run_program; use vars qw(@ISA @EXPORT); -use globals qw($in $prefix $install); +use globals "network", qw($in $prefix $install); @ISA = qw(Exporter); @EXPORT = qw(write_secret_backend ask_connect_now connect_backend disconnect_backend read_providers_backend ask_info2 connected disconnected); -- cgit v1.2.1