summaryrefslogtreecommitdiffstats
path: root/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl
diff options
context:
space:
mode:
Diffstat (limited to 'perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl')
-rw-r--r--perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl46
1 files changed, 46 insertions, 0 deletions
diff --git a/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl b/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl
new file mode 100644
index 000000000..eb13ab569
--- /dev/null
+++ b/perl-install/patch/patch-drakx-in-chroot-with-LVM-present.pl
@@ -0,0 +1,46 @@
+use install::install2;
+package install::install2;
+
+log::l("PATCH: not copying LVM devices in local_install's");
+
+undef *formatPartitions;
+*formatPartitions = sub {
+ my ($auto) = @_;
+
+ $o->{steps}{choosePackages}{done} = 0;
+ installStepsCall($o, $auto, 'choosePartitionsToFormat') if !$o->{isUpgrade} && !$::local_install;
+ my $want_root_formated = fs::get::root($o->{fstab})->{toFormat};
+ if ($want_root_formated) {
+ foreach ('/usr') {
+ my $part = fs::get::mntpoint2part($_, $o->{fstab}) or next;
+ $part->{toFormat} or die N("You must also format %s", $_);
+ }
+ }
+ installStepsCall($o, $auto, 'formatMountPartitions') if !$::testing;
+
+ if ($want_root_formated) {
+ #- we formatted /, ensure /var/lib/rpm is cleaned otherwise bad things can happen
+ #- (especially when /var is *not* formatted)
+ eval { rm_rf("$::prefix/var/lib/rpm") };
+ }
+
+ install::any::create_minimal_files();
+
+ eval { fs::mount::mount('none', "$::prefix/proc", 'proc') };
+ eval { fs::mount::mount('none', "$::prefix/sys", 'sysfs') };
+ eval { fs::mount::usbfs($::prefix) };
+
+ install::any::screenshot_dir__and_move();
+ install::any::move_compressed_image_to_disk($o);
+
+ any::rotate_logs($::prefix);
+
+ require raid;
+ raid::write_conf($o->{all_hds}{raids});
+
+ #- needed by lilo
+ if (-d '/dev/mapper' && !$::local_install) {
+ my @vgs = map { $_->{VG_name} } @{$o->{all_hds}{lvms}};
+ cp_af("/dev/$_", "$::prefix/dev") foreach 'mapper', @vgs;
+ }
+};