summaryrefslogtreecommitdiffstats
path: root/rescue/guessmounts
diff options
context:
space:
mode:
Diffstat (limited to 'rescue/guessmounts')
-rwxr-xr-xrescue/guessmounts7
1 files changed, 5 insertions, 2 deletions
diff --git a/rescue/guessmounts b/rescue/guessmounts
index 14d7cd804..67ef6c536 100755
--- a/rescue/guessmounts
+++ b/rescue/guessmounts
@@ -69,7 +69,10 @@ foreach (@$normal_parts) {
my $release = chomp_(cat_("$target$release_file"));
print STDERR "=> found a $release root partition on $dev\n=> type $fs, version `\n";
my @fstab = fs::read_fstab($target, '/etc/fstab');
- push @roots, { dev => $dev, release => $release, fs => $fs, fstab => \@fstab };
+ my $h = common::parse_release_file($target, $release_file, $_);
+ add2hash($h, { dev => $dev, fs => $fs, fstab => \@fstab,
+ pretty_name => "$h->{release} $h->{version} $h->{arch} on $dev" });
+ push @roots, $h;
}
system('umount', $target) == 0 or die "error unmounting $target\n";
}
@@ -79,7 +82,7 @@ my ($root, $fs, @fstab);
# Try Mageia first:
if (@roots) {
# Order by release number:
- @roots = sort { $b->{release} cmp $a->{release} } @roots;
+ @roots = sort { $b->{version} cmp $a->{version} } @roots;
# Then pick mga over mdv:
@roots = map { @$_ } partition { $_->{release} =~ /Mageia/ } @roots;
my $selected = first(@roots);