summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xdraklive7
1 files changed, 3 insertions, 4 deletions
diff --git a/draklive b/draklive
index a96b5bd..2307964 100755
--- a/draklive
+++ b/draklive
@@ -1023,11 +1023,11 @@ 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}};
mkdir_p($live->{mnt});
- foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @{$media->{partitions}}) {
+ foreach my $part (sort { $a->{mntpoint} cmp $b->{mntpoint} } @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)
@@ -1045,8 +1045,7 @@ sub record_harddisk_master {
install_grub_to_image($live, $media, $hd->{file}, $opts);
- foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @{$media->{partitions}}) {
- $_->{mntpoint} =~ m!^/! or next;
+ foreach my $part (sort { $b->{mntpoint} cmp $a->{mntpoint} } @partitions) {
run_('umount', $part->{real_device});
maybe_umount_device($part->{real_device});
devices::del_loop($part->{real_device}) if -f $hd->{file};