summaryrefslogtreecommitdiffstats
path: root/perl-install/install_any.pm
diff options
context:
space:
mode:
authorPascal Rigaux <pixel@mandriva.com>2003-01-15 23:26:15 +0000
committerPascal Rigaux <pixel@mandriva.com>2003-01-15 23:26:15 +0000
commite897879fac5c75701ca4feba108fc2334db5e3d2 (patch)
treefd604aedbb79dc6d600bf168a304300fbd1276b0 /perl-install/install_any.pm
parent23d00c78349b7980d2f0c231f28b190957d1f9e1 (diff)
downloaddrakx-e897879fac5c75701ca4feba108fc2334db5e3d2.tar
drakx-e897879fac5c75701ca4feba108fc2334db5e3d2.tar.gz
drakx-e897879fac5c75701ca4feba108fc2334db5e3d2.tar.bz2
drakx-e897879fac5c75701ca4feba108fc2334db5e3d2.tar.xz
drakx-e897879fac5c75701ca4feba108fc2334db5e3d2.zip
(find_root_parts):
- do not use guess_mount_point() anymore - check /etc/mandrake-release instead of /etc/fstab - return a list of { release => "Mandrake Linux release X.X (XXXX)", part => ... } instead of a list of parts
Diffstat (limited to 'perl-install/install_any.pm')
-rw-r--r--perl-install/install_any.pm15
1 files changed, 9 insertions, 6 deletions
diff --git a/perl-install/install_any.pm b/perl-install/install_any.pm
index ad759d52b..1990e891e 100644
--- a/perl-install/install_any.pm
+++ b/perl-install/install_any.pm
@@ -965,14 +965,17 @@ sub suggest_mount_points {
$_->{mntpoint} and log::l("suggest_mount_points: $_->{device} -> $_->{mntpoint}") foreach @$fstab;
}
-#- mainly for finding the root partitions for upgrade
sub find_root_parts {
my ($fstab, $prefix) = @_;
- log::l("find_root_parts");
- my $user;
- grep {
- my ($mnt) = guess_mount_point($_, $prefix, \$user);
- $mnt eq '/';
+ map {
+ if (my $handle = any::inspect($_, $prefix)) {
+ if (my $s = cat_("$handle->{dir}/etc/mandrake-release")) {
+ chomp($s);
+ $s =~ s/\s+for\s+\S+//;
+ log::l("find_root_parts found $_->{device}: $s");
+ { release => $s, part => $_ };
+ } else { () }
+ } else { () }
} @$fstab;
}
sub use_root_part {