summaryrefslogtreecommitdiffstats
path: root/perl-install/fs
diff options
context:
space:
mode:
authorPascal Terjan <pterjan@mandriva.org>2010-05-09 21:09:29 +0000
committerPascal Terjan <pterjan@mandriva.org>2010-05-09 21:09:29 +0000
commitcb1a0048f0f4d967705afdd4f2d78f0a8977bb22 (patch)
tree7a48a77899ac5b023d3a2baaac955c8ec8f39ceb /perl-install/fs
parent380e5ce3216907e2acf95f32020efbfa3369d945 (diff)
downloaddrakx-cb1a0048f0f4d967705afdd4f2d78f0a8977bb22.tar
drakx-cb1a0048f0f4d967705afdd4f2d78f0a8977bb22.tar.gz
drakx-cb1a0048f0f4d967705afdd4f2d78f0a8977bb22.tar.bz2
drakx-cb1a0048f0f4d967705afdd4f2d78f0a8977bb22.tar.xz
drakx-cb1a0048f0f4d967705afdd4f2d78f0a8977bb22.zip
fix creation of device mapper devices in fs::any::prepare_minimal_root
(this fixes initrd creation from one if using lvm)
Diffstat (limited to 'perl-install/fs')
-rw-r--r--perl-install/fs/any.pm16
1 files changed, 13 insertions, 3 deletions
diff --git a/perl-install/fs/any.pm b/perl-install/fs/any.pm
index 0d8b3ba7d..25784ea98 100644
--- a/perl-install/fs/any.pm
+++ b/perl-install/fs/any.pm
@@ -97,10 +97,20 @@ sub prepare_minimal_root {
eval { fs::mount::mount('none', "$::prefix/sys", 'sysfs') };
eval { fs::mount::usbfs($::prefix) };
- #- needed by lilo
- if (-d '/dev/mapper' && !$::local_install) {
+ #- needed by lilo and mkinitrd
+ if (-d '/dev/mapper') {
my @vgs = map { $_->{VG_name} } @{$all_hds->{lvms}};
- -e "/dev/$_" and cp_af("/dev/$_", "$::prefix/dev") foreach 'mapper', @vgs;
+ foreach my $dev ('mapper', @vgs) {
+ -e "/dev/$dev" or next;
+ cp_af("/dev/$dev", "$::prefix/dev");
+ foreach (all("/dev/$dev")) {
+ -l "/dev/$dev/$_" or next;
+ my $target = readlink "$::prefix/dev/$dev/$_";
+ $target =~ /^\// or $target="/dev/$dev/$target";
+ -e "$::prefix$target" and next;
+ cp_af($target, "$::prefix$target");
+ }
+ }
}
}