summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive7
1 files changed, 4 insertions, 3 deletions
diff --git a/draklive b/draklive
index 408924a..0f1ad2a 100755
--- a/draklive
+++ b/draklive
@@ -1023,7 +1023,6 @@ sub record_harddisk_master {
my $hd = get_hd_from_file($media, $main_device);
supplement_media_partitions($media, $hd);
- my @partitions = grep { $_->{mntpoint} =~ m!^/! } @{$media->{partitions}};
if (my $label = !$opts->{boot_only} && $media->get_media_label) {
my $slash_idx = $media->find_partition_index('/');
@@ -1032,8 +1031,9 @@ sub record_harddisk_master {
}
mkdir_p($live->{mnt});
- foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @partitions) {
+ foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @{$media->{partitions}}) {
set_part_real_device($hd, $part);
+ $_->{mntpoint} =~ m!^/! or next;
my $mnt = $live->{mnt} . $part->{mntpoint};
mkdir_p($mnt);
run_('mount', $part->{real_device}, $mnt)
@@ -1051,7 +1051,8 @@ sub record_harddisk_master {
install_grub_to_image($live, $media, $hd->{file}, $opts);
- foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @partitions) {
+ foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @{$media->{partitions}}) {
+ $_->{mntpoint} =~ m!^/! or next;
run_('umount', $part->{real_device});
maybe_umount_device($part->{real_device});
devices::del_loop($part->{real_device}) if -f $hd->{file};