diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-09-04 16:38:14 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-09-04 16:38:14 +0000 |
commit | a0af06516522c49497543443273552c00d08262a (patch) | |
tree | 57b2d139327eec6f94061c97f00e5df44e4f2ca3 /perl-install/fsedit.pm | |
parent | 9464e90e0fc14b8e7d7585e1600ac97e502fdb01 (diff) | |
download | drakx-a0af06516522c49497543443273552c00d08262a.tar drakx-a0af06516522c49497543443273552c00d08262a.tar.gz drakx-a0af06516522c49497543443273552c00d08262a.tar.bz2 drakx-a0af06516522c49497543443273552c00d08262a.tar.xz drakx-a0af06516522c49497543443273552c00d08262a.zip |
- don't expand symlinks in grub's menu.lst
- better use of /proc/partitions verification
Diffstat (limited to 'perl-install/fsedit.pm')
-rw-r--r-- | perl-install/fsedit.pm | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/perl-install/fsedit.pm b/perl-install/fsedit.pm index 2c96c39fc..e0b3f3d0d 100644 --- a/perl-install/fsedit.pm +++ b/perl-install/fsedit.pm @@ -312,10 +312,10 @@ sub is_one_big_fat { } sub file2part { - my ($prefix, $fstab, $file) = @_; + my ($prefix, $fstab, $file, $keep_simple_symlinks) = @_; my $part; - $file = expand_symlinks "$prefix$file"; + $file = $keep_simple_symlinks ? common::expand_symlinks_but_simple("$prefix$file") : expand_symlinks("$prefix$file"); unless ($file =~ s/^$prefix//) { my ($part) = grep { loopback::carryRootLoopback($_) } @$fstab or die; log::l("found $part->{mntpoint}"); @@ -324,7 +324,7 @@ sub file2part { foreach (@$fstab) { my $m = $_->{mntpoint}; $part = $_ if - $file =~ /^$m/ && + $file =~ /^\Q$m/ && (!$part || length $part->{mntpoint} < length $m); } $part or die "file2part: not found $file"; @@ -664,7 +664,16 @@ sub verifyHds { } my @parts = readProcPartitions($hds); - $ok &&= @parts == listlength(get_fstab(@$hds)) unless arch() eq "ppc"; + foreach my $hd (@$hds) { + my @l1 = partition_table::get_normal_parts($hd); + my @l2 = grep { $_->{rootDevice} eq $hd->{device} } @parts; + if (int(@l1) != int(@l2) && arch() ne 'ppc') { + log::l(sprintf + "/proc/partitions doesn't agree with drakx %d != %d:\n%s\n", int(@l1), int(@l2), + "/proc/partitions: " . join(", ", map { "$_->{device} ($_->{rootDevice})" } @parts)); + $ok = 0; + } + } if ($readonly && !$ok) { log::l("using /proc/partitions as diskdrake failed :("); |