summaryrefslogtreecommitdiffstats
path: root/perl-install
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
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')
-rw-r--r--perl-install/Makefile.config2
-rw-r--r--perl-install/NEWS4
-rw-r--r--perl-install/fs/any.pm16
3 files changed, 18 insertions, 4 deletions
diff --git a/perl-install/Makefile.config b/perl-install/Makefile.config
index cb490ffb4..7e07a7086 100644
--- a/perl-install/Makefile.config
+++ b/perl-install/Makefile.config
@@ -1,5 +1,5 @@
# -*- Makefile -*-
-VERSION:=13.23
+VERSION:=13.24
SUDO = sudo
TMPDIR = /tmp
diff --git a/perl-install/NEWS b/perl-install/NEWS
index 75e32c91f..d027b26f9 100644
--- a/perl-install/NEWS
+++ b/perl-install/NEWS
@@ -1,5 +1,9 @@
+Version 13.24 - 9 May 2010
+
- devices:
o get major/minor of device mapper correctly now that they are links
+- fix creation of device mapper devices in fs::any::prepare_minimal_root
+ (this fixes initrd creation from one if using lvm)
Version 13.23 - 30 April 2010
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");
+ }
+ }
}
}