summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive-install8
1 files changed, 7 insertions, 1 deletions
diff --git a/draklive-install b/draklive-install
index 48f46fc..eced2d6 100755
--- a/draklive-install
+++ b/draklive-install
@@ -84,7 +84,7 @@ sub umount_all {
foreach (grep { isSwap($_) } @$fstab) {
eval { fs::mount::swapoff($_->{device}) };
}
- foreach (map { $_->{mntpoint} && !isSwap($_) ? "/dev/$_->{device}" : () } @$fstab) {
+ foreach (map { $_->{isMounted} && !isSwap($_) ? "/dev/$_->{device}" : () } @$fstab) {
system('umount', $_);
}
}
@@ -147,6 +147,12 @@ sub init_hds {
!member($live_device, map { $_->{device} } partition_table::get_normal_parts_and_holes($_));
} @{$all_hds->{hds}} if $live_device;
+ #- some of the selected devices may have been manually mounted or auto-mounted, and we need to
+ #- ensure they will be unmounted before we start partitioning (mga#20268)
+ foreach my $p (@$fstab) {
+ $p->{isMounted} = 1 if grep { $_->{device} eq $p->{device} } @mounted;
+ }
+
my $err = $@;
umount_all($fstab);
if ($err) {