summaryrefslogtreecommitdiffstats
path: root/rescue/guessmounts
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2013-04-06 04:55:20 +0000
committerThierry Vignaud <tv@mageia.org>2013-04-06 04:55:20 +0000
commit3928e119899ee844bc0ac90e963d913782b8ae9c (patch)
tree6a79b53167228c2b76eb2b0ab518f038dd642cb9 /rescue/guessmounts
parentdd588b0df21a5fb4454b9f31ea67215e5669eac5 (diff)
downloaddrakx-3928e119899ee844bc0ac90e963d913782b8ae9c.tar
drakx-3928e119899ee844bc0ac90e963d913782b8ae9c.tar.gz
drakx-3928e119899ee844bc0ac90e963d913782b8ae9c.tar.bz2
drakx-3928e119899ee844bc0ac90e963d913782b8ae9c.tar.xz
drakx-3928e119899ee844bc0ac90e963d913782b8ae9c.zip
retrieve more info from installed OSes
(needed for next commit)
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);