From f31fed54311355559f8b9234863daa78edce465e Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 6 Jun 2005 03:22:11 +0000 Subject: new netconnect API --- perl-install/printer/printerdrake.pm | 6 +----- perl-install/standalone/drakgw | 12 +++++------- 2 files changed, 6 insertions(+), 12 deletions(-) (limited to 'perl-install') diff --git a/perl-install/printer/printerdrake.pm b/perl-install/printer/printerdrake.pm index 2d3eba81b..076ec9314 100644 --- a/perl-install/printer/printerdrake.pm +++ b/perl-install/printer/printerdrake.pm @@ -4162,11 +4162,7 @@ sub check_network { if ($::isInstall) { my $o = $in; require network::netconnect; - network::netconnect::main( - $o->{netcnx} ||= {}, - $in, $o->{modules_conf}, $o->{netc}, $o->{mouse}, - $o->{intf}); -# my ($prefix, $netcnx, $in, $o_netc, $o_mouse, $o_intf, $o_first_time, $o_noauto) = @_; + network::netconnect::real_main($o->{net}, $o, $o->{modules_conf}); } else { system("/usr/sbin/drakconnect"); } diff --git a/perl-install/standalone/drakgw b/perl-install/standalone/drakgw index 18ca3e7aa..b7ad9dffa 100755 --- a/perl-install/standalone/drakgw +++ b/perl-install/standalone/drakgw @@ -52,10 +52,8 @@ unless ($kernel_version >= 2.4) { $in->exit(-1); } -my $netc = {}; -my $netcnx = {}; -my $intfs = {}; -network::network::read_all_conf($::prefix, $netc, $intfs, $netcnx); +my $net = {}; +network::network::read_net_conf($net); my $modules_conf = modules::any_conf->read; my %eth_intf = map { $_->[0] => join(': ', $_->[0], $_->[2]) } network::ethernet::get_eth_cards($modules_conf); @@ -169,7 +167,7 @@ I am about to setup your Local Area Network with that adapter.", format_interfac lan_configure => { pre => sub { - $lan_intf = $intfs->{$lan_interface_name} ||= {}; + $lan_intf = $net->{ifcfg}{$lan_interface_name} ||= {}; $lan_intf->{DEVICE} = $lan_interface_name; $lan_intf->{ONBOOT} = 'yes'; $lan_intf->{BOOTPROTO} = 'static'; @@ -187,14 +185,14 @@ I am about to setup your Local Area Network with that adapter.", format_interfac }, complete => sub { network::network::update_broadcast_and_network($lan_intf); - if (my $conflict = find { $_->{NETWORK} eq $lan_intf->{NETWORK} } grep { $_->{DEVICE} ne $lan_intf->{DEVICE} } values %$intfs) { + if (my $conflict = find { $_->{NETWORK} eq $lan_intf->{NETWORK} } grep { $_->{DEVICE} ne $lan_intf->{DEVICE} } values %{$net->{ifcfg}}) { $in->ask_warn(N("Error"), N("Potential LAN address conflict found in current config of %s!\n", $conflict->{DEVICE})); return 1; } 0; }, post => sub { - network::network::configureNetwork2($in, $modules_conf, $::prefix, $netc, $intfs) unless $::testing; + network::network::configure_network($net, $in, $modules_conf) unless $::testing; return "dns"; }, }, -- cgit v1.2.1