summaryrefslogtreecommitdiffstats
path: root/perl-install/network/tools.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/network/tools.pm')
-rw-r--r--perl-install/network/tools.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/perl-install/network/tools.pm b/perl-install/network/tools.pm
index 082a6bda4..581732d7f 100644
--- a/perl-install/network/tools.pm
+++ b/perl-install/network/tools.pm
@@ -188,12 +188,13 @@ EOF
};
}
-sub use_windows() {
+sub use_windows {
+ my ($file) = @_;
my $all_hds = fsedit::get_hds({}, undef);
fs::get_info_from_fstab($all_hds, '');
my $part = find { $_->{device_windobe} eq 'C' } fsedit::get_fstab(@{$all_hds->{hds}});
$part or my $failed = N("No partition available");
- my $source = -d "$part->{mntpoint}/windows/" ? "$part->{mntpoint}/windows/system" : "$part->{mntpoint}/winnt/system";
+ my $source = find { -d $_ && -e "$_/$file" } map { "$part->{mntpoint}/$_" } qw(windows/system winnt/system windows/system32/drivers winnt/system32/drivers);
log::explanations($failed || "Seek in $source to find firmware");
return $source, $failed;