From 254bdb9006af77aab0cf54683f99f7b574b4a308 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sat, 6 Apr 2013 04:55:20 +0000 Subject: retrieve more info from installed OSes (needed for next commit) --- rescue/guessmounts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'rescue') 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); -- cgit v1.2.1