summaryrefslogtreecommitdiffstats
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
commit254bdb9006af77aab0cf54683f99f7b574b4a308 (patch)
tree6a79b53167228c2b76eb2b0ab518f038dd642cb9
parenta1e54612c0720c018143726d90d7e34d466b3e07 (diff)
downloaddrakx-backup-do-not-use-254bdb9006af77aab0cf54683f99f7b574b4a308.tar
drakx-backup-do-not-use-254bdb9006af77aab0cf54683f99f7b574b4a308.tar.gz
drakx-backup-do-not-use-254bdb9006af77aab0cf54683f99f7b574b4a308.tar.bz2
drakx-backup-do-not-use-254bdb9006af77aab0cf54683f99f7b574b4a308.tar.xz
drakx-backup-do-not-use-254bdb9006af77aab0cf54683f99f7b574b4a308.zip
retrieve more info from installed OSes
(needed for next commit)
-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);