From 7e8fa9773839843c9d8def81ec2ef1315115825a Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 21 Jul 2004 00:16:04 +0000 Subject: - %modules::conf is no more a global, so many functions need passing $modules_conf - $modules_conf is a class choosing modules.conf or modprobe.conf (esp. useful after install) (but not working yet!) - modules::load() doesn't use $modules_conf, use modules::load_and_configure() - modules::load() doesn't allow options, use either modules::load_raw() or modules::load_and_configure() - some functions used to want an array ref for modules options and some a string, now every functions use a string - many functions (like modules::get_alias()) are now methods on $modules_conf - some functions in mouse.pm needed a $in where a $do_pkgs is enough - some perl_checker compliance - small fixes --- perl-install/standalone/drakconnect | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'perl-install/standalone/drakconnect') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 844783d71..01f471326 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -51,7 +51,8 @@ if ($in->isa('interactive::gtk')) { require ugtk2; ugtk2->import(qw(:create :dialogs :helpers :wrappers)); } -network::tools::reread_net_conf($netcnx, $netc, $intf); +my $modules_conf = modules::any_conf->read; +network::tools::reread_net_conf($modules_conf, $netcnx, $netc, $intf); $::Wizard_title = N("Network & Internet Configuration"); $::Wizard_pix_up = "drakconnect.png"; @@ -122,7 +123,7 @@ $list->signal_connect(button_press_event => sub { configure_lan() if $event->type eq '2button-press'; }); -update_list(); +update_list($modules_conf); my ($label_host, $int_state); @@ -203,8 +204,8 @@ sub manage { eval(cat_('/etc/sysconfig/drakconnect')); - @all_cards = network::ethernet::get_eth_cards(); - my %name = network::ethernet::get_eth_cards_names(@all_cards); + @all_cards = network::ethernet::get_eth_cards($modules_conf); + my %name = network::ethernet::get_eth_cards_names($modules_conf, @all_cards); foreach (keys %name) { $p->{/eth|ath|wlan/ ? $name{$_} : $_} = { kind => $_ }; } @@ -269,7 +270,7 @@ sub build_tree { $intf->{save} = sub { $netc->{internet_cnx_choice} = 'adsl'; $netc->{at_boot} = $intf->{ONBOOT} eq 'yes' ? 1 : 0; - network::adsl::adsl_conf_backend($in, $intf, $netc, $interface_kind, $protocol) + network::adsl::adsl_conf_backend($in, $modules_conf, $intf, $netc, $interface_kind, $protocol) }; } elsif ($interface eq 'modem') { @@ -633,7 +634,7 @@ sub check_field { sub add_intf() { $::isWizard = 1; - network::netconnect::main('', $netcnx, $in, $netc, undef, $intf); + network::netconnect::main('', $netcnx, $in, $modules_conf, $netc, undef, $intf); $in->exit(0); } @@ -705,8 +706,9 @@ sub get_intf_ip { my %intf; -sub update_list() { - @all_cards = network::ethernet::get_eth_cards(); +sub update_list { + my ($modules_conf) = @_; + @all_cards = network::ethernet::get_eth_cards($modules_conf); my %new_intf = map { @$_ } @all_cards; my @new_intf = sort keys %new_intf; foreach my $interface (difference2(\@new_intf, [ keys %intf ])) { -- cgit v1.2.1