From 4a9eda8b12787d6d414ea4ea0d756ea7ddfc3292 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Fri, 3 Oct 2003 14:11:25 +0000 Subject: consolidate network conf reread --- perl-install/standalone/drakconnect | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) (limited to 'perl-install/standalone') diff --git a/perl-install/standalone/drakconnect b/perl-install/standalone/drakconnect index 1d34360dd..7ddccaa4e 100755 --- a/perl-install/standalone/drakconnect +++ b/perl-install/standalone/drakconnect @@ -66,11 +66,8 @@ MDK::Common::Globals::init( require ugtk2; ugtk2->import(qw(:create :dialogs :helpers :wrappers)); -network::netconnect::read_net_conf('', $netcnx, $netc); -modules::load_category('net'); -my @all_cards = network::ethernet::conf_network_card_backend($netc, $intf); -network::netconnect::load_conf($netcnx, $netc, $intf); -network::network::probe_netcnx_type('', $netc, $intf, $netcnx); +my @all_cards; +reread_net_conf(); my $window1 = ugtk2->new('drakconnect'); $window1->{rwindow}->signal_connect(delete_event => sub { ugtk2->exit(0) }); @@ -306,11 +303,7 @@ $SIG{CHLD} = sub { undef $wizard_pid; sensitive_buttons(1); $netcnx = {}; $netc = {}; $intf = {}; - network::netconnect::read_net_conf('', $netcnx, $netc); - modules::load_category('net'); - @all_cards = network::ethernet::conf_network_card_backend($netc, $intf); - network::netconnect::load_conf($netcnx, $netc, $intf); - network::network::probe_netcnx_type('', $netc, $intf, $netcnx); + reread_net_conf(); update_profiles(); update(); }; @@ -675,3 +668,11 @@ Create one first by clicking on 'Configure'"))); $dialog->show_all; $dialog->run; } + +sub reread_net_conf { + network::netconnect::read_net_conf('', $netcnx, $netc); + modules::load_category('net'); + @all_cards = network::ethernet::conf_network_card_backend($netc, $intf); + network::netconnect::load_conf($netcnx, $netc, $intf); + network::network::probe_netcnx_type('', $netc, $intf, $netcnx); +} -- cgit v1.2.1