From 226f306fecbb604fd78917dc6d9ef595eba74b99 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Mon, 18 Aug 2008 16:04:48 +0000 Subject: allow to detect network drivers for running system (when not maching all hardware) --- perl-install/pkgs.pm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'perl-install/pkgs.pm') diff --git a/perl-install/pkgs.pm b/perl-install/pkgs.pm index 02fbf8293..bd4648bc4 100644 --- a/perl-install/pkgs.pm +++ b/perl-install/pkgs.pm @@ -177,7 +177,14 @@ sub detect_network_drivers { my @l; foreach my $type (network::connection->get_types) { $type->can('get_thirdparty_settings') or next; - foreach my $settings (@{$type->get_thirdparty_settings || []}) { + my @network_settings; + if ($o_match_all_hardware) { + @network_settings = @{$type->get_thirdparty_settings || []}; + } else { + my @connections = $type->get_connections(automatic_only => 1, fast_only => 1); + @network_settings = map { @{$_->get_thirdparty_settings || []} } @connections; + } + foreach my $settings (@network_settings) { foreach (@network::thirdparty::thirdparty_types) { my @packages = network::thirdparty::get_required_packages($_, $settings); push @l, network::thirdparty::get_available_packages($_, $do_pkgs, @packages); -- cgit v1.2.1