From f1323d79cc7dd3aa5f4ebde2e2744d7a7ad56180 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 28 Jun 2005 09:12:16 +0000 Subject: try to cleanup fs.pm (to have simpler dependencies between modules, esp. have some modules only required by diskdrake): - move some functions from fs to fs::mount (most keep their name, except mount_part and mount_usbfs) - move formatMount_part and formatMount_all from fs to fs::format - move some functions from fs to fs::wild_device (part2wild_device_name -> fs::wild_device::from_part) (subpart_from_wild_device_name -> fs::wild_device::to_subpart) (analyze_wild_device_name -> fs::wild_device::analyse) - formatMount_part(), formatMount_all(), fs::mount::part() don't take a prefix anymore the current situation was quite muddy we now rely on fs::get::mntpoint_prefixed() which will maybe depend on a field in $part for now, we mount every part in chroot, it seems to be what's wanted - fs::format::part() now expect $all_hds instead of $raids - fs::type::carryRootLoopback is now fs::get::carry_root_loopback() - in fs::loopback, most functions don't want a prefix anymore --- globetrotter/make_live | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'globetrotter/make_live') diff --git a/globetrotter/make_live b/globetrotter/make_live index 8555b8397..3ec5bd109 100755 --- a/globetrotter/make_live +++ b/globetrotter/make_live @@ -312,7 +312,7 @@ sub installPackages() { $ENV{LD_LIBRARY_PATH} = "/lib:/usr/lib:/usr/X11R6/lib:/usr/lib/qt3/lib"; pkgs::install(0, \@toInstall, $o->{packages}); - eval { fs::umount("$::prefix/proc") }; + eval { fs::mount::umount("$::prefix/proc") }; } sub config_X_proprietary_drivers() { @@ -340,14 +340,14 @@ my $cleaner = before_leaving { print "Cleaning on exiting\n"; print "- Umounting partitions:\n"; print "\tumounting /proc\n"; - eval { fs::umount("$::prefix/proc") }; + eval { fs::mount::umount("$::prefix/proc") }; # fs::umount("$::prefix/$_") foreach 'mnt/packages', 'mnt/share', 'home', ''; if ($fstab) { print "\tumounting everything else\n"; - eval { fs::umount_all($fstab, $::prefix) } or system("umount $::prefix"); + eval { fs::mount::umount_all($fstab) } or system("umount $::prefix"); } print "\tumounting /tmp\n"; - eval { fs::umount("/tmp") } if $rescue; + eval { fs::mount::umount("/tmp") } if $rescue; print "Cleaning done\n"; }; @@ -382,7 +382,7 @@ run_program::run('tune2fs', '-L', "MDK-ROOT", "/dev/$root->{device}"); $fstab = [ fs::get::fstab($all_hds) ]; # we need to mount every fs we want to see into /etc/fstab !!! -fs::mount_part($_, $::prefix) foreach sort { $a->{mntpoint} cmp $b->{mntpoint} } @$fstab; +fs::mount::part($_) foreach sort { $a->{mntpoint} cmp $b->{mntpoint} } @$fstab; symlink("$::prefix/mnt/packages", "/export") if $rescue; -- cgit v1.2.1