diff options
author | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-03-19 15:27:53 +0100 |
---|---|---|
committer | Thierry Vignaud <thierry.vignaud@gmail.com> | 2020-03-19 15:46:22 +0100 |
commit | 37b7a9920f605e7383c0f1ce5f1763b3425e893e (patch) | |
tree | 4c3aa40de93488b2384c8716800137c2b1712c10 | |
parent | 643a23bd11c335e543ff400fe6c8387312847c10 (diff) | |
download | drakx-37b7a9920f605e7383c0f1ce5f1763b3425e893e.tar drakx-37b7a9920f605e7383c0f1ce5f1763b3425e893e.tar.gz drakx-37b7a9920f605e7383c0f1ce5f1763b3425e893e.tar.bz2 drakx-37b7a9920f605e7383c0f1ce5f1763b3425e893e.tar.xz drakx-37b7a9920f605e7383c0f1ce5f1763b3425e893e.zip |
Restoring displaying found version
And also display a shorter distribution name (eg: "Mageia (Cauldron)"
which is still longer than just "Mageia").
history:
commit fd8bbba2f02b8bccd69e67c326fd320c0827941d wrongly introduced a
"%s" in place of "Mandriva" (w/o adding any argument)
Then commit e95388927be1f0de67413bdb5430cf0031710f54 fixed it by
replacing "%s" with the displayed release info at end.
However commit 3928e119899ee844bc0ac90e963d913782b8ae9c enables us to
have the info we want, so just use that
-rw-r--r-- | rescue/NEWS | 1 | ||||
-rwxr-xr-x | rescue/bin/guessmounts | 4 |
2 files changed, 3 insertions, 2 deletions
diff --git a/rescue/NEWS b/rescue/NEWS index ab773729e..3030ba281 100644 --- a/rescue/NEWS +++ b/rescue/NEWS @@ -1,5 +1,6 @@ - do not preload all fs modules uselessly - guessmount: + o fix displaying the version of the distro o just use the fs reported by blkid instead of doing brute force guessing Version 1.63 - 19 March 2020 by Thierry Vignaud diff --git a/rescue/bin/guessmounts b/rescue/bin/guessmounts index a4d1fa7f7..683e47c70 100755 --- a/rescue/bin/guessmounts +++ b/rescue/bin/guessmounts @@ -67,12 +67,12 @@ foreach (@$normal_parts) { system("mount -t $fs $dev $target 2>/dev/null"); if (my $release_file = common::release_file($target)) { - 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'); 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" }); + my $release = chomp_(cat_("$target$release_file")); + printf STDERR "=> found a %s root partition on $dev\n=> type $fs, version `$release'\n", $h->{release}; # Offer to rescue only same arch: $h->{pretty_name} .= " (cannot be rescued: $h->{arch} ne $arch;)" if $h->{arch} ne $arch; push @roots, $h; |