summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index ad759d52b..1990e891e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -965,14 +965,17 @@ sub suggest_mount_points {
$_->{mntpoint} and log::l("suggest_mount_points: $_->{device} -> $_->{mntpoint}") foreach @$fstab;
}
-#- mainly for finding the root partitions for upgrade
sub find_root_parts {
my ($fstab, $prefix) = @_;
- log::l("find_root_parts");
- my $user;
- grep {
- my ($mnt) = guess_mount_point($_, $prefix, \$user);
- $mnt eq '/';
+ map {
+ if (my $handle = any::inspect($_, $prefix)) {
+ if (my $s = cat_("$handle->{dir}/etc/mandrake-release")) {
+ chomp($s);
+ $s =~ s/\s+for\s+\S+//;
+ log::l("find_root_parts found $_->{device}: $s");
+ { release => $s, part => $_ };
+ } else { () }
+ } else { () }
} @$fstab;
}
sub use_root_part {