diff options
author | Pascal Rigaux <pixel@mandriva.com> | 2001-08-24 12:41:59 +0000 |
---|---|---|
committer | Pascal Rigaux <pixel@mandriva.com> | 2001-08-24 12:41:59 +0000 |
commit | ce3d76402238df340a784d56b49a7790e5405aba (patch) | |
tree | 2e31e4e20dd0567ae79782229a1970686d1b3ccb /perl-install/partition_table.pm | |
parent | bb168ec2d43cb9eeec299660d2a543019731097b (diff) | |
download | drakx-backup-do-not-use-ce3d76402238df340a784d56b49a7790e5405aba.tar drakx-backup-do-not-use-ce3d76402238df340a784d56b49a7790e5405aba.tar.gz drakx-backup-do-not-use-ce3d76402238df340a784d56b49a7790e5405aba.tar.bz2 drakx-backup-do-not-use-ce3d76402238df340a784d56b49a7790e5405aba.tar.xz drakx-backup-do-not-use-ce3d76402238df340a784d56b49a7790e5405aba.zip |
(write): unmount+remount real_mntpoint before doing the kernel_read
Diffstat (limited to 'perl-install/partition_table.pm')
-rw-r--r-- | perl-install/partition_table.pm | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/perl-install/partition_table.pm b/perl-install/partition_table.pm index 0df607094..4bcfe70ea 100644 --- a/perl-install/partition_table.pm +++ b/perl-install/partition_table.pm @@ -541,7 +541,15 @@ sub write { #- now sync disk and re-read the partition table if ($hd->{needKernelReread}) { common::sync(); + + my @magic_parts = grep { $_->{isMounted} && $_->{real_mntpoint} } get_normal_parts($hd); + foreach (@magic_parts) { + syscall_('umount', $_->{real_mntpoint}) or die _("error unmounting %s: %s", $_->{real_mntpoint}, "$!"); + } $hd->kernel_read; + foreach (@magic_parts) { + syscall_('mount', , $_->{real_mntpoint}, type2fs($_), c::MS_MGC_VAL()) or die _("mount failed: ") . "$!"; + } $hd->{needKernelReread} = 0; } } |