From a3715cc453d4f8de5563359ed3bd30d2cfd32929 Mon Sep 17 00:00:00 2001 From: Olivier Blin Date: Thu, 28 Feb 2008 22:22:46 +0000 Subject: create fs::any::prepare_minimal_root() out of install::install2::formatPartitions() (to be used in draklive-install --- perl-install/fs/any.pm | 16 ++++++++++++++++ perl-install/install/install2.pm | 12 +----------- 2 files changed, 17 insertions(+), 11 deletions(-) diff --git a/perl-install/fs/any.pm b/perl-install/fs/any.pm index 00d4639a0..d523a6943 100644 --- a/perl-install/fs/any.pm +++ b/perl-install/fs/any.pm @@ -88,4 +88,20 @@ sub create_minimal_files() { chmod 0666, "$::prefix/dev/null"; } +sub prepare_minimal_root { + my ($all_hds) = @_; + + fs::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) }; + + #- needed by lilo + if (-d '/dev/mapper' && !$::local_install) { + my @vgs = map { $_->{VG_name} } @{$all_hds->{lvms}}; + -e "/dev/$_" and cp_af("/dev/$_", "$::prefix/dev") foreach 'mapper', @vgs; + } +} + 1; diff --git a/perl-install/install/install2.pm b/perl-install/install/install2.pm index b894b6b8b..281116c70 100644 --- a/perl-install/install/install2.pm +++ b/perl-install/install/install2.pm @@ -177,17 +177,7 @@ sub formatPartitions { eval { rm_rf("$::prefix/var/lib/rpm") }; } - fs::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) }; - - #- needed by lilo - if (-d '/dev/mapper' && !$::local_install) { - my @vgs = map { $_->{VG_name} } @{$o->{all_hds}{lvms}}; - -e "/dev/$_" and cp_af("/dev/$_", "$::prefix/dev") foreach 'mapper', @vgs; - } + fs::any::prepare_minimal_root($o->{all_hds}); install::any::screenshot_dir__and_move(); install::any::move_compressed_image_to_disk($o); -- cgit v1.2.1